{"cells":[{"cell_type":"markdown","metadata":{"id":"2E0B14BD3C3040649132934448F94B80","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["# <center> Lecture15 : Hierarchical Models (2)</center>  \n"," \n","## <center> Instructor: Dr. Hu Chuan-Peng </center> "]},{"cell_type":"markdown","metadata":{"id":"68E43224B12B417F96618E1262E1315E","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["## Intro  \n","\n","在上一节课程中，我们学习了层级模型的基本概念，考虑了自我控制分数在不同站点和不同个体间的变化。  \n","\n","🤔 然而，我们更想回答的问题是，压力对自我控制的影响是否在不同站点间存在差异？  \n","\n","* 一种可能是，自我控制分数在不同站点间存在差异，但是压力对自我控制的影响在不同站点不存在差异。  \n","* 另一种可能是，站点只调节压力对自我控制的影响，而各站点间自我控制分数相当。  \n","* 最后，站点可能既影响自我控制分数，又影响压力对自我控制的效应。  \n","\n","![Image Name](https://cdn.kesci.com/upload/s5sh35okpe.png?imageView2/0/w/640/h/640)  \n"]},{"cell_type":"markdown","metadata":{"id":"D1287188E1C747468A3D2E756B13E9DB","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["在本节课中，我们将介绍引入包含自变量时的层级模型，并通过不同的模型验证不同的假设：  \n","* H0(model 0)，图A，普通线性模型，仅考虑压力对自我控制的影响。  \n","* H1(model 1)，图B，变化截距模型，在模型0的基础上考虑自我控制在不同站点的变化。  \n","* H2(model 2)，图C，变化斜率模型，在模型0的基础上不同站点间的压力影响的变化。  \n","* H3(model 3)，图D，变化截距和斜率模型，结合模型1和模型2，同时考虑站点对自我控制以及压力影响的变化。  \n","\n","![Image Name](https://cdn.kesci.com/upload/s5sh35okpe.png?imageView2/0/w/640/h/640)"]},{"cell_type":"code","execution_count":1,"metadata":{"collapsed":false,"id":"DE2B03EB9638412A8F433DB0D463BC1A","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"skip"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["WARNING (pytensor.tensor.blas): Using NumPy C-API based implementation for BLAS functions.\n"]}],"source":["# 导入 pymc 模型包，和 arviz 等分析工具 \n","import pymc as pm\n","import arviz as az\n","import seaborn as sns\n","import scipy.stats as st\n","import numpy as np\n","import matplotlib.pyplot as plt\n","import xarray as xr\n","import pandas as pd\n","import ipywidgets\n","import bambi as bmb\n","\n","# 忽略不必要的警告\n","import warnings\n","warnings.filterwarnings(\"ignore\")"]},{"cell_type":"code","execution_count":38,"metadata":{"collapsed":false,"id":"BC93D86487BC420482C72D6E37763CE0","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"skip"},"tags":[],"trusted":true},"outputs":[],"source":["# 通过 pd.read_csv 加载数据 Data_Sum_HPP_Multi_Site_Share.csv\n","try:\n","  df_raw = pd.read_csv('/home/mw/input/bayes20238001/Data_Sum_HPP_Multi_Site_Share.csv')\n","except:\n","  df_raw = pd.read_csv('data/Data_Sum_HPP_Multi_Site_Share.csv')\n","\n","# 选取所需站点\n","first5_site = ['Southampton','Portugal','Kassel','Tsinghua','UCSB']\n","df_first5 = df_raw.query(\"Site in @first5_site\")\n","# 生成站点索引\n","df_first5[\"site_idx\"] = pd.factorize(df_first5.Site)[0]\n","# 生成被试数索引\n","df_first5[\"obs_id\"] = range(len(df_first5))\n","# 将站点、被试id设置为索引\n","df_first5.set_index(['Site','obs_id'],inplace=True,drop=False)\n"]},{"cell_type":"markdown","metadata":{"id":"F903DFD858884A6EA4B6FB0878B9FCBF","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["## Model0: Complete pooling  \n","\n","如果我们忽略数据的层级结构，认为所有数据都来自一个更大的总体，只需要用一个回归方程来描述自变量与因变量的关系。  \n","\n","此时的回归模型采样了完全池化 (complete) 方法，对应假设0 (H0) 和模型0 (model 0):  \n","\n","$$  \n","\\begin{array}{lcrl}  \n","\\text{data:} & \\hspace{.05in} &   Y_i | \\beta_0, \\beta_1, \\sigma & \\stackrel{ind}{\\sim} N\\left(\\mu_i, \\sigma^2\\right) \\;\\; \\text{ with } \\;\\; \\mu_i = \\beta_0 + \\beta_1X_i \\\\  \n","\n","\\text{priors:} & & \\beta_{0}  & \\sim N\\left(0, 50^2 \\right)  \\\\  \n","                    & & \\beta_1  & \\sim N\\left(0, 5^2 \\right) \\\\  \n","                    & & \\sigma   & \\sim \\text{Exp}(1)  \\\\  \n","\\end{array}  \n","$$ "]},{"cell_type":"code","execution_count":39,"metadata":{"collapsed":false,"id":"77A8EE49764B46C9928A82223811FA14","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/plain":["<seaborn.axisgrid.FacetGrid at 0x7f5e2198d0a0>"]},"execution_count":39,"metadata":{},"output_type":"execute_result"},{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/14FBAC7199104772A5AD249A25E7E0B0/s5wknt7kov.png\">"],"text/plain":["<Figure size 600x400 with 1 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["# 通过完全池化的方式可视化数据\n","sns.lmplot(df_first5,\n","           x=\"stress\",\n","           y=\"scontrol\",\n","           height=4, aspect=1.5)"]},{"cell_type":"markdown","metadata":{"id":"D5E6FF096282486688B9AB8DC6EF7040","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 模型定义与采样"]},{"cell_type":"code","execution_count":40,"metadata":{"collapsed":false,"id":"33E3C2FD09FF4600BCA88AEC0D338266","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"fragment"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Auto-assigning NUTS sampler...\n","Initializing NUTS using jitter+adapt_diag...\n","Multiprocess sampling (4 chains in 4 jobs)\n","NUTS: [beta_0, beta_1, sigma]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling 4 chains for 1_000 tune and 1_000 draw iterations (4_000 + 4_000 draws total) took 7 seconds.\n"]}],"source":["# 注意，以下代码可能运行2分钟左右\n","\n","coords = {\"obs_id\": df_first5.obs_id}\n","with pm.Model(coords=coords) as complete_pooled_model:\n","\n","    beta_0 = pm.Normal(\"beta_0\", mu=0, sigma=50)                #定义beta_0          \n","    beta_1 = pm.Normal(\"beta_1\", mu=0, sigma=5)                 #定义beta_1\n","    sigma = pm.Exponential(\"sigma\", 1)                          #定义sigma\n","\n","    x = pm.MutableData(\"x\", df_first5.stress, dims=\"obs_id\")    #x是自变量压力水平\n","\n","    mu = pm.Deterministic(\"mu\",beta_0 + beta_1 * x, \n","                          dims=\"obs_id\")                        #定义mu，讲自变量与先验结合\n","\n","    likelihood = pm.Normal(\"y_est\", mu=mu, sigma=sigma, observed=df_first5.scontrol,\n","                           dims=\"obs_id\")                       #定义似然：预测值y符合N(mu, sigma)分布\n","                                                                #通过 observed 传入实际数据y 自我控制水平\n","    complete_trace = pm.sample(random_seed=84735)"]},{"cell_type":"code","execution_count":41,"metadata":{"collapsed":false,"id":"732DFA56982E47CF91F4C01AB6D0E2A3","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"fragment"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/4AA685D851C64BD78F31147F4A63F3F8/s5wkooa7e4.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e127d7cd0>"]},"execution_count":41,"metadata":{},"output_type":"execute_result"}],"source":["pm.model_to_graphviz(complete_pooled_model)"]},{"cell_type":"markdown","metadata":{"id":"722CB7E60F1448F78BC547A0D501109E","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 后验参数估计：  \n","\n","结果显示：  \n","\n","$\\mu_i = \\beta_0 + \\beta_1X_i$  \n","- $\\beta_0 = 63.17$  \n","- $\\beta_1 = -0.58$"]},{"cell_type":"code","execution_count":42,"metadata":{"collapsed":false,"id":"4D17830F27E8472597B7787EFC8AE9BC","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"fragment"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>mean</th>\n","      <th>sd</th>\n","      <th>hdi_3%</th>\n","      <th>hdi_97%</th>\n","      <th>mcse_mean</th>\n","      <th>mcse_sd</th>\n","      <th>ess_bulk</th>\n","      <th>ess_tail</th>\n","      <th>r_hat</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>beta_0</th>\n","      <td>63.320</td>\n","      <td>1.890</td>\n","      <td>59.597</td>\n","      <td>66.761</td>\n","      <td>0.049</td>\n","      <td>0.034</td>\n","      <td>1511.0</td>\n","      <td>1453.0</td>\n","      <td>1.00</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1</th>\n","      <td>-0.578</td>\n","      <td>0.046</td>\n","      <td>-0.666</td>\n","      <td>-0.492</td>\n","      <td>0.001</td>\n","      <td>0.001</td>\n","      <td>1517.0</td>\n","      <td>1572.0</td>\n","      <td>1.00</td>\n","    </tr>\n","    <tr>\n","      <th>sigma</th>\n","      <td>6.472</td>\n","      <td>0.215</td>\n","      <td>6.060</td>\n","      <td>6.847</td>\n","      <td>0.005</td>\n","      <td>0.003</td>\n","      <td>1898.0</td>\n","      <td>1748.0</td>\n","      <td>1.01</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["          mean     sd  hdi_3%  hdi_97%  mcse_mean  mcse_sd  ess_bulk  \\\n","beta_0  63.320  1.890  59.597   66.761      0.049    0.034    1511.0   \n","beta_1  -0.578  0.046  -0.666   -0.492      0.001    0.001    1517.0   \n","sigma    6.472  0.215   6.060    6.847      0.005    0.003    1898.0   \n","\n","        ess_tail  r_hat  \n","beta_0    1453.0   1.00  \n","beta_1    1572.0   1.00  \n","sigma     1748.0   1.01  "]},"execution_count":42,"metadata":{},"output_type":"execute_result"}],"source":["az.summary(complete_trace,\n","           var_names=[\"~mu\"],\n","           filter_vars=\"like\")"]},{"cell_type":"markdown","metadata":{"id":"740044C1199148B1AE901E5CB19027C0","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 后验预测回归线  \n","\n","* 完全池化模型假设，所有站点中自我控制分数一致，并且压力的影响也一致。  \n","* 下图展示了不同站点下后验预测的结果，可以看到他们的回归线是一致的。"]},{"cell_type":"code","execution_count":43,"metadata":{"collapsed":false,"id":"09D2C302190F4E12A7C8DB6B4611305D","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"fragment"},"tags":[],"trusted":true},"outputs":[],"source":["#提取不同站点数据对应的索引并储存，便于后续将后验预测数据按照站点进行提取\n","def get_group_index(data):\n","    group_index = {}\n","    for i, group in enumerate(data[\"Site\"].unique()):\n","        group_index[group] = xr.DataArray(data.query(f\"Site == '{group}'\"))[\"obs_id\"].values\n","    return group_index"]},{"cell_type":"code","execution_count":44,"metadata":{"collapsed":false,"id":"745E33FA038448AAACEE7D1ACBF7A254","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"fragment"},"tags":[],"trusted":true},"outputs":[],"source":["#定义函数，绘制不同站点下的后验预测回归线\n","def plot_regression(data, trace, group_index):\n","    # 定义画布，根据站点数量定义画布的列数\n","    fig, ax = plt.subplots(1,len(data[\"Site\"].unique()), \n","                       sharex=True,\n","                       sharey=True,\n","                       figsize=(15,5))\n","    \n","    # 根据站点数来分别绘图\n","    # 我们需要的数据有原始数据，每一个因变量的后验预测均值\n","    # 这些数据都储存在后验参数采样结果中，也就是这里所用的trace\n","    for i, group in enumerate(data[\"Site\"].unique()):\n","        #绘制真实数据的散点图\n","        x = trace.constant_data.x.sel(obs_id = group_index[f\"{group}\"])\n","        y = trace.observed_data.y_est.sel(obs_id = group_index[f\"{group}\"])\n","        mu = trace.posterior.mu.sel(obs_id = group_index[f\"{group}\"])\n","        ax[i].scatter(x, y,\n","                color=f\"C{i}\",\n","                alpha=0.5)\n","        #绘制回归线\n","        ax[i].plot(x, mu.stack(sample=(\"chain\",\"draw\")).mean(dim=\"sample\"),\n","                color=f\"C{i}\",\n","                alpha=0.5)\n","        #绘制预测值95%HDI\n","        az.plot_hdi(\n","            x, mu,\n","            hdi_prob=0.95,\n","            fill_kwargs={\"alpha\": 0.25, \"linewidth\": 0},\n","            color=f\"C{i}\",\n","            ax=ax[i])\n","    # 生成横坐标名称\n","    fig.text(0.5, 0, 'Stress', ha='center', va='center', fontsize=12)\n","    # 生成纵坐标名称\n","    fig.text(0.08, 0.5, 'Self control', ha='center', va='center', rotation='vertical', fontsize=12)\n","    # 生成标题\n","    plt.suptitle(\"Posterior regression models\", fontsize=15)\n","        \n","    sns.despine()"]},{"cell_type":"code","execution_count":45,"metadata":{"collapsed":false,"id":"C7F4F696B19E45A98714CF4177392CD7","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/7CA67DC28ABB4A63985513A778154C09/s5wkoogl0u.png\">"],"text/plain":["<Figure size 1500x500 with 5 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["# 获取每个站点数据的索引\n","first5_index = get_group_index(data=df_first5)\n","# 进行可视化\n","plot_regression(data=df_first5,\n","                trace=complete_trace,\n","                group_index=first5_index)"]},{"cell_type":"markdown","metadata":{"id":"D0F5E3B02C434619ACBDAF0632757CBC","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["## No pooling  \n","\n","接下来我们暂时忽略总体信息，只考虑分组信息  \n","\n","* 不同站点间，线性关系中的参数(斜率、截距)是相互独立的  \n","\n","* 我们使用$j$来表示不同的站点，$j\\in(0,1,2,3,4,5)$，从分布中抽取不同站点的参数  \n","\n","\n","$$  \n","\\begin{array}{lcrl}  \n","\\text{data:} & \\hspace{.05in} &   Y_i | \\beta_0j, \\beta_1j, \\sigma & \\stackrel{ind}{\\sim} N\\left(\\mu_i, \\sigma^2\\right) \\;\\; \\text{ with } \\;\\; \\mu_i = \\beta_{0j} + \\beta_{1j}X_i \\\\  \n","\n","\\text{priors:} & & \\beta_{0j}  & \\sim N\\left(0, 50^2 \\right)  \\\\  \n","                    & & \\beta_{1j}  & \\sim N\\left(0, 5^2 \\right) \\\\  \n","                    & & \\sigma   & \\sim \\text{Exp}(1)  \\\\  \n","\\end{array}  \n","$$ "]},{"cell_type":"code","execution_count":46,"metadata":{"collapsed":false,"id":"6941C99B5D0F4A59837C9C6743E719EA","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"fragment"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/A73605F2C95E4C9DBF4CEB312B740454/s5wkoon0qs.png\">"],"text/plain":["<Figure size 2000x400 with 5 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["# 创建画图所需的网格数\n","g = sns.FacetGrid(df_first5, col=\"Site\", col_wrap=5, height=4)\n","\n","# 将各个图所画的内容对应到画布上\n","g.map(sns.regplot, \"stress\", \"scontrol\")\n","\n","# Show the plot\n","plt.show()"]},{"cell_type":"markdown","metadata":{"id":"F0AB3C1D2F5542C995C07FD84CA8D78F","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 模型定义与采样"]},{"cell_type":"code","execution_count":47,"metadata":{"collapsed":false,"id":"5C06867E664E4667940AB87D19CEC7BA","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Auto-assigning NUTS sampler...\n","Initializing NUTS using jitter+adapt_diag...\n","Multiprocess sampling (4 chains in 4 jobs)\n","NUTS: [beta_0, beta_1, sigma]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling 4 chains for 1_000 tune and 1_000 draw iterations (4_000 + 4_000 draws total) took 26 seconds.\n","There were 1 divergences after tuning. Increase `target_accept` or reparameterize.\n"]}],"source":["# 注意，以下代码可能运行2分钟左右\n","\n","coords = {\"site\": df_first5[\"Site\"].unique(),\n","          \"obs_id\": df_first5.obs_id}\n","\n","with pm.Model(coords=coords) as no_pooled_model:\n","\n","    #定义截距、斜率，指定dims=\"site\"，生成每个站点对应的截距、斜率\n","    beta_0 = pm.Normal(\"beta_0\", mu=0, sigma=50, dims=\"site\")\n","    beta_1 = pm.Normal(\"beta_1\", mu=0, sigma=5, dims=\"site\")    \n","    #定义sigma，指定dims=\"site\"，生成不同的sigma\n","    sigma = pm.Exponential(\"sigma\", 2, dims=\"site\") \n","\n","    #传入自变量、获得观测值对应的站点映射\n","    site = pm.MutableData(\"site\", df_first5.site_idx, dims=\"obs_id\") \n","    x = pm.MutableData(\"x\", df_first5.stress, dims=\"obs_id\")\n","\n","    #线性关系\n","    mu = pm.Deterministic(\"mu\", beta_0[site]+beta_1[site]*x, dims=\"obs_id\")\n","    # 定义 likelihood\n","    likelihood = pm.Normal(\"y_est\", mu=mu, sigma=sigma[site], observed=df_first5.scontrol, dims=\"obs_id\")\n","\n","    no_trace = pm.sample(random_seed=84735)"]},{"cell_type":"code","execution_count":48,"metadata":{"collapsed":false,"id":"04A754B5B7774C3DA2720BDBA2636B33","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/918D5A4C44F84D13B4EE031B08FE2EBD/s5wkoos2ob.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e21a5d760>"]},"execution_count":48,"metadata":{},"output_type":"execute_result"}],"source":["pm.model_to_graphviz(no_pooled_model)"]},{"cell_type":"markdown","metadata":{"id":"A1DB4E8241E646EDA2B4A3AF8E0572C0","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["###  后验参数估计  \n","\n","* 可以看到每个站点的的截距(beta_0[xx])、斜率(beta_1[xx])，以及观测值所服从的正态分布中的标准差sigma[xx]都是不同的"]},{"cell_type":"code","execution_count":49,"metadata":{"collapsed":false,"id":"37698318DA1C42DA9B3F3F38ED1721D9","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"fragment"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>mean</th>\n","      <th>sd</th>\n","      <th>hdi_3%</th>\n","      <th>hdi_97%</th>\n","      <th>mcse_mean</th>\n","      <th>mcse_sd</th>\n","      <th>ess_bulk</th>\n","      <th>ess_tail</th>\n","      <th>r_hat</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>beta_0[Kassel]</th>\n","      <td>65.889</td>\n","      <td>3.855</td>\n","      <td>58.438</td>\n","      <td>72.926</td>\n","      <td>0.063</td>\n","      <td>0.045</td>\n","      <td>3744.0</td>\n","      <td>2828.0</td>\n","      <td>1.00</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0[Portugal]</th>\n","      <td>67.895</td>\n","      <td>9.090</td>\n","      <td>49.460</td>\n","      <td>84.429</td>\n","      <td>0.150</td>\n","      <td>0.106</td>\n","      <td>3691.0</td>\n","      <td>2869.0</td>\n","      <td>1.00</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0[Southampton]</th>\n","      <td>23.493</td>\n","      <td>21.585</td>\n","      <td>-18.565</td>\n","      <td>63.199</td>\n","      <td>0.336</td>\n","      <td>0.263</td>\n","      <td>4172.0</td>\n","      <td>2682.0</td>\n","      <td>1.00</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0[Tsinghua]</th>\n","      <td>55.820</td>\n","      <td>2.528</td>\n","      <td>51.262</td>\n","      <td>60.993</td>\n","      <td>0.043</td>\n","      <td>0.030</td>\n","      <td>3532.0</td>\n","      <td>2629.0</td>\n","      <td>1.01</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0[UCSB]</th>\n","      <td>68.193</td>\n","      <td>3.811</td>\n","      <td>60.700</td>\n","      <td>75.167</td>\n","      <td>0.062</td>\n","      <td>0.044</td>\n","      <td>3724.0</td>\n","      <td>2734.0</td>\n","      <td>1.00</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1[Kassel]</th>\n","      <td>-0.618</td>\n","      <td>0.096</td>\n","      <td>-0.800</td>\n","      <td>-0.441</td>\n","      <td>0.002</td>\n","      <td>0.001</td>\n","      <td>3725.0</td>\n","      <td>3162.0</td>\n","      <td>1.00</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1[Portugal]</th>\n","      <td>-0.573</td>\n","      <td>0.237</td>\n","      <td>-1.042</td>\n","      <td>-0.129</td>\n","      <td>0.004</td>\n","      <td>0.003</td>\n","      <td>3654.0</td>\n","      <td>2825.0</td>\n","      <td>1.00</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1[Southampton]</th>\n","      <td>0.379</td>\n","      <td>0.541</td>\n","      <td>-0.679</td>\n","      <td>1.379</td>\n","      <td>0.008</td>\n","      <td>0.008</td>\n","      <td>4074.0</td>\n","      <td>2572.0</td>\n","      <td>1.00</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1[Tsinghua]</th>\n","      <td>-0.410</td>\n","      <td>0.063</td>\n","      <td>-0.531</td>\n","      <td>-0.293</td>\n","      <td>0.001</td>\n","      <td>0.001</td>\n","      <td>3477.0</td>\n","      <td>2511.0</td>\n","      <td>1.01</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1[UCSB]</th>\n","      <td>-0.707</td>\n","      <td>0.089</td>\n","      <td>-0.868</td>\n","      <td>-0.531</td>\n","      <td>0.001</td>\n","      <td>0.001</td>\n","      <td>3754.0</td>\n","      <td>2644.0</td>\n","      <td>1.00</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                       mean      sd  hdi_3%  hdi_97%  mcse_mean  mcse_sd  \\\n","beta_0[Kassel]       65.889   3.855  58.438   72.926      0.063    0.045   \n","beta_0[Portugal]     67.895   9.090  49.460   84.429      0.150    0.106   \n","beta_0[Southampton]  23.493  21.585 -18.565   63.199      0.336    0.263   \n","beta_0[Tsinghua]     55.820   2.528  51.262   60.993      0.043    0.030   \n","beta_0[UCSB]         68.193   3.811  60.700   75.167      0.062    0.044   \n","beta_1[Kassel]       -0.618   0.096  -0.800   -0.441      0.002    0.001   \n","beta_1[Portugal]     -0.573   0.237  -1.042   -0.129      0.004    0.003   \n","beta_1[Southampton]   0.379   0.541  -0.679    1.379      0.008    0.008   \n","beta_1[Tsinghua]     -0.410   0.063  -0.531   -0.293      0.001    0.001   \n","beta_1[UCSB]         -0.707   0.089  -0.868   -0.531      0.001    0.001   \n","\n","                     ess_bulk  ess_tail  r_hat  \n","beta_0[Kassel]         3744.0    2828.0   1.00  \n","beta_0[Portugal]       3691.0    2869.0   1.00  \n","beta_0[Southampton]    4172.0    2682.0   1.00  \n","beta_0[Tsinghua]       3532.0    2629.0   1.01  \n","beta_0[UCSB]           3724.0    2734.0   1.00  \n","beta_1[Kassel]         3725.0    3162.0   1.00  \n","beta_1[Portugal]       3654.0    2825.0   1.00  \n","beta_1[Southampton]    4074.0    2572.0   1.00  \n","beta_1[Tsinghua]       3477.0    2511.0   1.01  \n","beta_1[UCSB]           3754.0    2644.0   1.00  "]},"execution_count":49,"metadata":{},"output_type":"execute_result"}],"source":["az.summary(no_trace,\n","           var_names=[\"beta\",\"beta_1\"],\n","           filter_vars=\"like\")"]},{"cell_type":"code","execution_count":50,"metadata":{"collapsed":false,"id":"EE977004A81D4F049F5599A9DB96A318","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/1E3B1989AA23477D9EF4ABC44AA2BA76/s5wkooxw74.png\">"],"text/plain":["<Figure size 2000x500 with 2 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["# 设置绘图坐标\n","figs, (ax1, ax2) = plt.subplots(1,2, figsize = (20,5))\n","# 绘制变化的截距\n","az.plot_forest(no_trace,\n","           var_names=[\"~mu\", \"~sigma\", \"~offset\", \"~beta_1\"],\n","           filter_vars=\"like\",\n","           combined = True,\n","           ax=ax1)\n","# 绘制变化的斜率\n","az.plot_forest(no_trace,\n","           var_names=[\"~mu\", \"~sigma\", \"~offset\", \"~beta_0\"],\n","           filter_vars=\"like\",\n","           combined = True,\n","           ax=ax2)\n","plt.show()"]},{"cell_type":"markdown","metadata":{"id":"D73C6D60FF4744D9B66CA08E1707AC20","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 后验预测回归线  \n","\n","* 在非池化模型中，生成了5条斜率与截距各不相同的回归线  \n"]},{"cell_type":"code","execution_count":51,"metadata":{"collapsed":false,"id":"AFE0252611E442FDACE0A5858098FF25","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/82AB3BEC17714BD495F23863F750DE43/s5wkooupcl.png\">"],"text/plain":["<Figure size 1500x500 with 5 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["first5_index = get_group_index(data=df_first5)\n","plot_regression(data=df_first5,\n","                trace=no_trace,\n","                group_index=first5_index)"]},{"cell_type":"markdown","metadata":{"id":"FEA0258993C84E65AC72C500248F6D34","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["## Partial pooling & hierarchical model  \n","\n","非池化模型 (no pooling)没有考虑总体和站点之间的关系，仅把不同站点当作独立群体。现在我们开始考虑如何使用部分池化方法 (partial pooling)来构建分层模型。  \n","\n","* 考虑到不同站点下回归模型的截距 ($\\beta_0$) 和斜率 ($\\beta_1$) 都可能发生变化  \n","* 我们首先考虑截距 ($\\beta_0$)随站点变化的模型 (model1，变化截距模型)  \n","* 然后再考虑斜率 ($\\beta_1$) 随站点变化的模型 (model2，变化斜率模型)  \n","* 最后，我们同时考虑截距 ($\\beta_0$)和斜率 ($\\beta_1$) 随站点的变化 (model3，变化截距和斜率模型)  \n","\n","![Image Name](https://cdn.kesci.com/upload/s5eeyrh0s5.png?imageView2/0/w/960/h/960)  \n","\n","* $j$来表示站点，$j \\in \\{1,2, \\ldots, 5\\}$  \n","* $i$来表示站点内部的每一个数据$i \\in \\{1,2,\\ldots,n_j\\}$  \n","* 每一个被试的数据可以被表示为$Y_{ij}$，表示站点$j$内的第$i$个被试的自我控制分数观测值  \n","\n","$$  \n","Y := \\left((Y_{11}, Y_{21}, \\ldots, Y_{n_1,1}), (Y_{12}, Y_{22}, \\ldots, Y_{n_2,2}), \\ldots, (Y_{1,5}, Y_{2,5}, \\ldots, Y_{n_{5},5})\\right)  .  \n","$$ "]},{"cell_type":"markdown","metadata":{"id":"6E8C7D38BFE140A5972C6D001F909E42","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["##  Model1: Hierarchical model with varying intercepts  \n","\n","相较于没有自变量的分层模型，构建包含自变量的分层模型的关键在于区分 **变量($\\beta$)** 和 **分层(layer)** 的关系。  \n","\n","$$  \n","\\begin{array}{rll}  \n","Y_{ij} | \\beta_{0j}, \\beta_1, \\sigma_y & \\sim N(\\mu_{ij}, \\sigma_y^2) \\;\\; \\text{ with } \\;\\;  \\mu_{ij} = \\beta_{0j} + \\beta_1 X_{ij} & \\text{(每个站点内的线性模型)} \\\\  \n","\\beta_{0j} | \\beta_0, \\sigma_0  & \\stackrel{ind}{\\sim} N(\\beta_0, \\sigma_0^2) & \\text{(截距在站点间的变化)} \\\\  \n","\\beta_{0}  & \\sim N(0, 50^2) & \\text{(全局参数的先验)} \\\\  \n","\\beta_1  & \\sim N(0, 5^2) & \\\\  \n","\\sigma_y & \\sim \\text{Exp}(1)    & \\\\  \n","\\sigma_0 & \\sim \\text{Exp}(1).    & \\\\  \n","\\end{array}  \n","$$"]},{"cell_type":"markdown","metadata":{"id":"925AE8ECB07D4F03AF49D967B4374AF9","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### Layer 1: Variability within Site  \n","\n","**1. 自我控制与压力之间的关系在被试内有什么不同**  \n","\n","$$  \n","Y_{ij} | \\beta_{j}, \\beta_1, \\sigma_y \\sim N(\\mu_{ij}, \\sigma_y^2) \\;\\; \\text{ where } \\; \\mu_{ij} = \\beta_{0j} + \\beta_1 X_{ij}  .  \n","$$  \n","\n","* 使用$i$表示每个站点内的第$i$个被试，$i \\in (1,2,3...n)$  \n","* 对于每一个被试来说，其自我控制分数服从以$\\mu_{ij}$为均值，$\\sigma_y$为标准差的正态分布  \n","\n","* 而$\\mu_{ij}$由参数$\\beta_{0j}$，$\\beta_1$决定  \n","\n","    * 其中，$\\beta_{0j}$在组与组之间不同(group-specific)  \n","\n","    * $\\beta_1$和$\\sigma_y$则是相同的(global)"]},{"cell_type":"markdown","metadata":{"id":"53CBBE13E90D4DC0834D48F9ED2333E0","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### Layer 2: Variability between Site  \n","**2. 自我控制与压力之间的线性关系在站点间有什么不同**  \n","\n","* 自我控制与压力之间的线性关系由截距和斜率两方面构成  \n","\n","* 我们认为在不同的站点之间，其截距是变化的  \n","\n","* 假设截距的基线(baseline)为$\\beta_{0}$，不同站点间的组间差异为$\\sigma_{0}$，则每个站点的截距可以表示为：  \n","\n","$$  \n","\\beta_{0j} | \\beta_0, \\sigma_0 \\stackrel{ind}{\\sim} N(\\beta_0, \\sigma_0^2)  .  \n","$$"]},{"cell_type":"markdown","metadata":{"id":"5C28E6C74BD446168774E373B04BF144","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### Layer 3: Global priors  \n","**3. 最后，我们对全局参数进行定义，即$\\beta_{0}, \\beta_1,  \\sigma_0$**  \n","\n","$$  \n","\\begin{array}{rll}  \n","\\beta_{0}  & \\sim N(m_0, s_0^2)  \\\\  \n","\\beta_1  & \\sim N(m_1, s_1^2) & \\\\  \n","\\sigma_y & \\sim \\text{Exp}(l_y)    & \\\\  \n","\\sigma_0 & \\sim \\text{Exp}(l_0)    & \\\\  \n","\\end{array}  \n","\n","$$"]},{"cell_type":"markdown","metadata":{"id":"7E1CAC369A9E491A829286775554AE00","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["**总结模型定义：**  \n","\n","$$  \n","\\begin{array}{rll}  \n","Y_{ij} | \\beta_{0j}, \\beta_1, \\sigma_y & \\sim N(\\mu_{ij}, \\sigma_y^2) \\;\\; \\text{ with } \\;\\;  \\mu_{ij} = \\beta_{0j} + \\beta_1 X_{ij} & \\text{(每个站点内的线性模型)} \\\\  \n","\\beta_{0j} | \\beta_0, \\sigma_0  & \\stackrel{ind}{\\sim} N(\\beta_0, \\sigma_0^2) & \\text{(截距在站点间的变化)} \\\\  \n","\\beta_{0}  & \\sim N(0, 50^2) & \\text{(全局参数的先验)} \\\\  \n","\\beta_1  & \\sim N(0, 5^2) & \\\\  \n","\\sigma_y & \\sim \\text{Exp}(1)    & \\\\  \n","\\sigma_0 & \\sim \\text{Exp}(1).    & \\\\  \n","\\end{array}  \n","$$"]},{"cell_type":"markdown","metadata":{"id":"EF4EC41F1A1A478F9EA02668D868FD72","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 另一种理解方式  \n","\n","* 我们可以把不同站点间截距的变化用另一种方式表达：  \n","\n","    * 不同站点间的截距是在总体的 $\\beta_0$ 的基础上加上站点的特异性变异 $b_{0j}$， $\\beta_{0j} = \\beta_0 + b_{0j}$  \n","\n","    * 而$b_{0j}$ 则满足$b_{0j} \\sim N(0, \\sigma_0^2)$， $b_{0j} \\sim N(0, \\sigma_0^2)$  \n","\n","\n","* 整理一下则有：  \n","\n","$$  \n","\\begin{split}  \n","Y_{ij} | \\beta_{0j}, \\beta_1, \\sigma_y & \\sim N(\\mu_{ij}, \\sigma_y^2) \\;\\; \\text{ with } \\;\\;  \\mu_{ij} = (\\beta_0 + b_{0j}) + \\beta_1 X_{ij}  \\\\  \n","b_{0j} | \\sigma_0  & \\stackrel{ind}{\\sim} N(0, \\sigma_0^2)  \\\\  \n","\\beta_{0}  & \\sim N(0, 50^2) \\\\  \n","\\beta_1  & \\sim N(0, 1^2)  \\\\  \n","\\sigma_y & \\sim \\text{Exp}(1)  \\\\  \n","\\sigma_0 & \\sim \\text{Exp}(1).  \\\\  \n","\\end{split}  \n","$$"]},{"cell_type":"markdown","metadata":{"id":"0A11BD56AAB640FBB22117FFAEA0E78C","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 模型定义与采样  \n","\n","* 这里我们将上述两种定义方式均转换为pymc代码，并比较两种定义方式下MCMC采样结果的差异  \n","* 首先，我们设定总体的参数 $\\beta_0$, $\\beta_1$。  \n","\t* 由于 $\\beta_{0j}$ 在不同站点间不同，因此我们 设定总体参数 $\\sigma_0$ 并假设每个站点 $\\beta_{0j} \\sim N(\\beta_0, \\sigma_0)$  \n","\t \n","\t*  在另一种定义方式下，我们将$\\beta_{0j}$ 视为 $\\beta_0$与$b_{0j}$的组合  \n","\t* 之后，我们通过线性公式生成 $\\mu = \\beta_{0j} + \\beta_1 * x$  \n","\t* 最后，个体层面的数据 y 服从 $N(\\mu, \\sigma_y)$，其中 $\\sigma_y$ 为组内变异。  \n"]},{"cell_type":"code","execution_count":52,"metadata":{"collapsed":false,"id":"9881198C6B2248748C535F01E76B18AA","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[],"source":["# 定义函数来构建和采样模型\n","def run_var_inter_model(non_centered = False):\n","\n","    #定义数据坐标，包括站点和观测索引\n","    coords = {\"site\": df_first5[\"Site\"].unique(),\n","            \"obs_id\": df_first5.obs_id}\n","\n","    with pm.Model(coords=coords) as var_inter_model:\n","        #定义全局参数\n","        beta_0 = pm.Normal(\"beta_0\", mu=40, sigma=20)\n","        beta_0_sigma = pm.Exponential(\"beta_0_sigma\", 1)\n","        beta_1 = pm.Normal(\"beta_1\", mu=0, sigma=5)\n","        sigma_y = pm.Exponential(\"sigma_y\", 1) \n","\n","        #传入自变量、获得观测值对应的站点映射\n","        x = pm.MutableData(\"x\", df_first5.stress, dims=\"obs_id\")\n","        site = pm.MutableData(\"site\", df_first5.site_idx, dims=\"obs_id\") \n","        \n","        #选择不同的模型定义方式\n","        if non_centered:\n","            beta_0_offset = pm.Normal(\"beta_0_offset\", 0, sigma=1, dims=\"site\")\n","            beta_0j = pm.Deterministic(\"beta_0j\", beta_0 + beta_0_offset * beta_0_sigma, dims=\"site\")\n","        else:\n","            beta_0j = pm.Normal(\"beta_0j\", mu=beta_0, sigma=beta_0_sigma, dims=\"site\")\n","\n","        #线性关系\n","        mu = pm.Deterministic(\"mu\", beta_0j[site]+beta_1*x, dims=\"obs_id\")\n","\n","        # 定义 likelihood\n","        likelihood = pm.Normal(\"y_est\", mu=mu, sigma=sigma_y, observed=df_first5.scontrol, dims=\"obs_id\")\n","\n","        var_inter_trace = pm.sample(draws=5000,           # 使用mcmc方法进行采样，draws为采样次数\n","                            tune=1000,                    # tune为调整采样策略的次数，可以决定这些结果是否要被保留\n","                            chains=4,                     # 链数\n","                            discard_tuned_samples= True,  # tune的结果将在采样结束后被丢弃\n","                            random_seed=84735,\n","                            target_accept=0.99)\n","    \n","    return var_inter_model, var_inter_trace"]},{"cell_type":"code","execution_count":53,"metadata":{"collapsed":false,"id":"16C31FE7AE2A4196B506E1976FA761BA","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Auto-assigning NUTS sampler...\n","Initializing NUTS using jitter+adapt_diag...\n","Multiprocess sampling (4 chains in 4 jobs)\n","NUTS: [beta_0, beta_0_sigma, beta_1, sigma_y, beta_0j]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 97 seconds.\n","There were 22 divergences after tuning. Increase `target_accept` or reparameterize.\n"]}],"source":["# 注意，以下代码可能运行5分钟左右\n","\n","var_inter_model_centered, var_inter_trace_centered = run_var_inter_model(non_centered = False)"]},{"cell_type":"code","execution_count":54,"metadata":{"collapsed":false,"id":"B7AE33974B5E4CBC80F985D34BCC5FC5","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/6534C07387EF425EA7A006C452EB9BBC/s5wkrf991o.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e21b94940>"]},"execution_count":54,"metadata":{},"output_type":"execute_result"}],"source":["pm.model_to_graphviz(var_inter_model_centered)"]},{"cell_type":"code","execution_count":55,"metadata":{"collapsed":false,"id":"3EF79BFF68E741F583208D6E560B8C2D","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Auto-assigning NUTS sampler...\n","Initializing NUTS using jitter+adapt_diag...\n","Multiprocess sampling (4 chains in 4 jobs)\n","NUTS: [beta_0, beta_0_sigma, beta_1, sigma_y, beta_0_offset]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 95 seconds.\n"]}],"source":["var_inter_model, var_inter_trace = run_var_inter_model(non_centered = True)"]},{"cell_type":"code","execution_count":56,"metadata":{"collapsed":false,"id":"C080D7DD09A647E3902AB71BF6DE3F08","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/1EA79C5C07E7413596F2AD514C818161/s5wkuc6xmk.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e202d2310>"]},"execution_count":56,"metadata":{},"output_type":"execute_result"}],"source":["pm.model_to_graphviz(var_inter_model)"]},{"cell_type":"markdown","metadata":{"id":"C2AA7D6CF69F4F61AD2154905CF6A156","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 先验预测检查"]},{"cell_type":"code","execution_count":57,"metadata":{"collapsed":false,"id":"7825F9C5A5BC47438528163D01A443AE","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Sampling: [beta_0, beta_0_offset, beta_0_sigma, beta_1, sigma_y, y_est]\n"]}],"source":["var_inter_prior = pm.sample_prior_predictive(samples=50,\n","                                            model=var_inter_model,\n","                                            random_seed=84735)"]},{"cell_type":"code","execution_count":58,"metadata":{"collapsed":false,"id":"D8F912752F7B4C0989BD09CCAB4EB6FE","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[],"source":["# 定义绘制先验预测回归线的函数，其逻辑与绘制后验预测回归线相同\n","def plot_prior(prior,group_index):\n","    # 定义画布，根据站点数量定义画布的列数\n","    fig, ax = plt.subplots(1,len(df_first5[\"Site\"].unique()), \n","                        sharex=True,\n","                        sharey=True,\n","                        figsize=(20,5))\n","    # 根据站点数来分别绘图\n","    # 我们需要的数据有原始数据中的自变量，每一个因变量的先验预测均值\n","    # 这些数据都储存在先验预测采样结果中，也就是这里所用的prior\n","    for i, group in enumerate(df_first5[\"Site\"].unique()): \n","        #绘制回归线\n","        ax[i].plot(prior.constant_data[\"x\"].sel(obs_id = group_index[f\"{group}\"]),\n","                prior.prior[\"mu\"].sel(obs_id = group_index[f\"{group}\"]).stack(sample=(\"chain\",\"draw\")),\n","                c='gray',\n","                alpha=0.5)\n","        ax[i].set_title(f\"{group}\")\n","    fig.text(0.5, 0, 'Stress', ha='center', va='center', fontsize=12)\n","    # 生成纵坐标名称\n","    fig.text(0.08, 0.5, 'Self control', ha='center', va='center', rotation='vertical', fontsize=12)\n","    # 生成标题\n","    plt.suptitle(\"Prior regression models\", fontsize=15, y=1)\n","        \n","    sns.despine()"]},{"cell_type":"code","execution_count":59,"metadata":{"collapsed":false,"id":"004F60C702C346A180992D767A34F8F1","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/0594912100F343E893DEBA5F6ECBA751/s5wkud33aw.png\">"],"text/plain":["<Figure size 2000x500 with 5 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["plot_prior(prior=var_inter_prior,\n","           group_index=first5_index)"]},{"cell_type":"markdown","metadata":{"id":"85D2994E4D734AAE91EB420A479D9813","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["###  MCMC采样&后验参数估计  \n","\n","* 可以看到5条回归线的斜率都是一致的 $\\beta_1 = -0.56$  \n","* 总体层面的解决 $\\beta_0 = 63.15$  \n","* 但截距$\\beta_{0j}$[xx]有所不同:  \n","    * $\\beta_{0}$[Kassel] = 63.56  \n","    * $\\beta_{0}$[Portugal] = 65.37  \n","    * $\\beta_{0}$[Southampton] = 62.58  \n","    * $\\beta_{0}$[Tsinghua] = 62.09  \n","    * $\\beta_{0}$[UCSB] = 62.37"]},{"cell_type":"code","execution_count":60,"metadata":{"collapsed":false,"id":"CBD6336314F74BE89D998AB1DD520791","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>mean</th>\n","      <th>sd</th>\n","      <th>hdi_3%</th>\n","      <th>hdi_97%</th>\n","      <th>mcse_mean</th>\n","      <th>mcse_sd</th>\n","      <th>ess_bulk</th>\n","      <th>ess_tail</th>\n","      <th>r_hat</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>beta_0</th>\n","      <td>63.148</td>\n","      <td>2.088</td>\n","      <td>59.342</td>\n","      <td>67.175</td>\n","      <td>0.023</td>\n","      <td>0.016</td>\n","      <td>8390.0</td>\n","      <td>11140.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1</th>\n","      <td>-0.563</td>\n","      <td>0.047</td>\n","      <td>-0.651</td>\n","      <td>-0.473</td>\n","      <td>0.000</td>\n","      <td>0.000</td>\n","      <td>9881.0</td>\n","      <td>12031.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[Kassel]</th>\n","      <td>63.556</td>\n","      <td>1.967</td>\n","      <td>59.869</td>\n","      <td>67.292</td>\n","      <td>0.019</td>\n","      <td>0.014</td>\n","      <td>10461.0</td>\n","      <td>12406.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[Portugal]</th>\n","      <td>65.369</td>\n","      <td>2.303</td>\n","      <td>61.083</td>\n","      <td>69.659</td>\n","      <td>0.023</td>\n","      <td>0.017</td>\n","      <td>9717.0</td>\n","      <td>12261.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[Southampton]</th>\n","      <td>62.578</td>\n","      <td>2.400</td>\n","      <td>58.065</td>\n","      <td>67.057</td>\n","      <td>0.023</td>\n","      <td>0.016</td>\n","      <td>10884.0</td>\n","      <td>13666.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[Tsinghua]</th>\n","      <td>62.090</td>\n","      <td>1.963</td>\n","      <td>58.307</td>\n","      <td>65.657</td>\n","      <td>0.020</td>\n","      <td>0.014</td>\n","      <td>9767.0</td>\n","      <td>12428.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[UCSB]</th>\n","      <td>62.371</td>\n","      <td>2.063</td>\n","      <td>58.530</td>\n","      <td>66.219</td>\n","      <td>0.021</td>\n","      <td>0.015</td>\n","      <td>9843.0</td>\n","      <td>11940.0</td>\n","      <td>1.0</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                        mean     sd  hdi_3%  hdi_97%  mcse_mean  mcse_sd  \\\n","beta_0                63.148  2.088  59.342   67.175      0.023    0.016   \n","beta_1                -0.563  0.047  -0.651   -0.473      0.000    0.000   \n","beta_0j[Kassel]       63.556  1.967  59.869   67.292      0.019    0.014   \n","beta_0j[Portugal]     65.369  2.303  61.083   69.659      0.023    0.017   \n","beta_0j[Southampton]  62.578  2.400  58.065   67.057      0.023    0.016   \n","beta_0j[Tsinghua]     62.090  1.963  58.307   65.657      0.020    0.014   \n","beta_0j[UCSB]         62.371  2.063  58.530   66.219      0.021    0.015   \n","\n","                      ess_bulk  ess_tail  r_hat  \n","beta_0                  8390.0   11140.0    1.0  \n","beta_1                  9881.0   12031.0    1.0  \n","beta_0j[Kassel]        10461.0   12406.0    1.0  \n","beta_0j[Portugal]       9717.0   12261.0    1.0  \n","beta_0j[Southampton]   10884.0   13666.0    1.0  \n","beta_0j[Tsinghua]       9767.0   12428.0    1.0  \n","beta_0j[UCSB]           9843.0   11940.0    1.0  "]},"execution_count":60,"metadata":{},"output_type":"execute_result"}],"source":["# ~ 和filter_vars=\"like\" 表示在显示结果时去除掉包含这些字符的变量\n","var_inter_para = az.summary(var_inter_trace,\n","           var_names=[\"~mu\",\"~_sigma\",\"~_offset\",\"~sigma_\"],\n","           filter_vars=\"like\")\n","var_inter_para"]},{"cell_type":"code","execution_count":61,"metadata":{"collapsed":false,"id":"4364A7B4481A488EA24D36A09018E406","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/plain":["array([<Axes: title={'center': '94.0% HDI'}>], dtype=object)"]},"execution_count":61,"metadata":{},"output_type":"execute_result"},{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/BFBAAEF15B154BB1A5D170655E1289D1/s5wkueiz2h.png\">"],"text/plain":["<Figure size 600x560 with 1 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["az.plot_forest(var_inter_trace,\n","           var_names=[\"~mu\", \"~sigma\", \"~offset\", \"~beta_1\"],\n","           filter_vars=\"like\",\n","           combined = True)"]},{"cell_type":"markdown","metadata":{"id":"F2B388F2CD534982A94A99F39F640083","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 后验预测回归线  \n","\n","* 5条回归线的截距不同，斜率相同"]},{"cell_type":"code","execution_count":62,"metadata":{"collapsed":false,"id":"03189FD238F7458893E38C90245F7965","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"skip"},"tags":[],"trusted":true},"outputs":[],"source":["#定义函数，绘制不同站点下的后验预测回归线\n","def plot_partial_regression(data, trace, group_index):\n","    # 定义画布，根据站点数量定义画布的列数\n","    fig, ax = plt.subplots(1,len(data[\"Site\"].unique()), \n","                       sharex=True,\n","                       sharey=True,\n","                       figsize=(15,5))\n","    \n","    # 根据站点数来分别绘图\n","    # 我们需要的数据有原始数据，每一个因变量的后验预测均值\n","    # 这些数据都储存在后验参数采样结果中，也就是这里所用的trace\n","    for i, group in enumerate(data[\"Site\"].unique()):\n","        #绘制真实数据的散点图\n","        x = trace.constant_data.x.sel(obs_id = group_index[f\"{group}\"])\n","        y = trace.observed_data.y_est.sel(obs_id = group_index[f\"{group}\"])\n","        mu = trace.posterior.mu.sel(obs_id = group_index[f\"{group}\"])\n","        ax[i].scatter(x, y,\n","                color=f\"C{i}\",\n","                alpha=0.5)\n","        #绘制回归线\n","        ax[i].plot(x, mu.stack(sample=(\"chain\",\"draw\")).mean(dim=\"sample\"),\n","                color=f\"C{i}\",\n","                alpha=0.5)\n","        ax[i].set_title(f\"Intercept: {var_inter_para.loc[f'beta_0j[{group}]']['mean']}\", fontsize=12)\n","        #绘制预测值95%HDI\n","        az.plot_hdi(\n","            x, mu,\n","            hdi_prob=0.95,\n","            fill_kwargs={\"alpha\": 0.25, \"linewidth\": 0},\n","            color=f\"C{i}\",\n","            ax=ax[i])\n","        \n","    # 生成横坐标名称\n","    fig.text(0.5, 0, 'Stress', ha='center', va='center', fontsize=12)\n","    # 生成纵坐标名称\n","    fig.text(0.08, 0.5, 'Self control', ha='center', va='center', rotation='vertical', fontsize=12)\n","    # 生成标题\n","    plt.suptitle(\"Posterior regression models(varing intercept)\", fontsize=15, y=1.05)\n","        \n","    sns.despine()"]},{"cell_type":"code","execution_count":63,"metadata":{"collapsed":false,"id":"FA6861D71D5C45E2936248E1A00F8282","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/A907CD730BC6487CB705969E789A4A4B/s5wkufw526.png\">"],"text/plain":["<Figure size 1500x500 with 5 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["plot_partial_regression(data=df_first5,\n","                trace=var_inter_trace,\n","                group_index=first5_index)"]},{"cell_type":"markdown","metadata":{"id":"96C8D138D993461D899A9A3637C6D0B9","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 组间方差与组内方差  \n","\n","* 在这个模型定义中，组间方差来自`beta_0_offset`，组内方差来自`sigma_y`  \n","* 结果发现：组间变异 (0.067) 小于组内变异 (0.932)，表明组内相关性低。"]},{"cell_type":"code","execution_count":64,"metadata":{"collapsed":false,"id":"F669A1F410144CD083BBB4484B1AA2E5","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stdout","output_type":"stream","text":["被组间方差所解释的部分： 0.06711151565666632\n","被组内方差所解释的部分： 0.9328884843433337\n","组内相关： 0.06711151565666632\n"]}],"source":["# 提取组间和组内变异\n","para_sum = az.summary(var_inter_trace,\n","                      var_names=[\"_offset\",\"sigma_\"],\n","                      filter_vars=\"like\")\n","between_sd = (para_sum.filter(like='_offset', axis=0)[\"mean\"]**2).sum()\n","within_sd = para_sum.loc['sigma_y','mean']**2\n","# 计算变异占比\n","var = between_sd + within_sd\n","print(\"被组间方差所解释的部分：\", between_sd/var)\n","print(\"被组内方差所解释的部分：\", within_sd/var)\n","print(\"组内相关：\",between_sd/var)\n"]},{"cell_type":"markdown","metadata":{"id":"C1B181839B08477DB162A7169B691A22","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["## Model2: Hierarchical model with varying slopes  \n","\n","* 上一个模型考虑了回归截距随站点的变化，在模型2中，我们假设不同站点间的回归截距保持不变，但回归斜率随站点变化。  \n","\n","$$  \n","\\beta_{1j} | \\beta_1, \\sigma_1 \\sim N(\\beta_1, \\sigma_1^2)  \n","$$  \n","\n","类似于模型1，**模型2的定义形式为：**  \n","\n","$$  \n","\\begin{array}{rll}  \n","Y_{ij} | \\beta_{0}, \\beta_{1j}, \\sigma_y & \\sim N(\\mu_{ij}, \\sigma_y^2) \\;\\; \\text{ with } \\;\\;  \\mu_{ij} = \\beta_{0} + \\beta_{1j} X_{ij} & \\text{(每个站点内的线性模型)} \\\\  \n","\\beta_{1j} | \\beta_1, \\sigma_1  & \\stackrel{ind}{\\sim} N(\\beta_1, \\sigma_1^2)  & \\text{(斜率在站点间的变化)} \\\\  \n","\\beta_{0}  & \\sim N(0, 50^2) & \\text{(全局参数的先验)} \\\\  \n","\\beta_1  & \\sim N(0, 5^2) & \\\\  \n","\\sigma_y & \\sim \\text{Exp}(1)    & \\\\  \n","\\sigma_1 & \\sim \\text{Exp}(1).    & \\\\  \n","\\end{array}  \n","$$  \n","\n","或：  \n","\n","$$  \n","\\begin{array}{rll}  \n","Y_{ij} | \\beta_{0}, \\beta_{1j}, \\sigma_y & \\sim N(\\mu_{ij}, \\sigma_y^2) \\;\\; \\text{ with } \\;\\;  \\mu_{ij} = \\beta_{0} + (\\beta_{1} + b_{1j}) X_{ij} & \\text{(每个站点内的线性模型)} \\\\  \n","b_{1j} | \\sigma_1 & \\stackrel{ind}{\\sim} N(0, \\sigma_1^2) & \\text{(斜率在站点间的变化)} \\\\  \n","\\beta_{0}  & \\sim N(0, 50^2) & \\text{(全局参数的先验)} \\\\  \n","\\beta_1  & \\sim N(0, 5^2) & \\\\  \n","\\sigma_y & \\sim \\text{Exp}(1)    & \\\\  \n","\\sigma_1 & \\sim \\text{Exp}(1).    & \\\\  \n","\\end{array}  \n","$$"]},{"cell_type":"code","execution_count":65,"metadata":{"collapsed":false,"id":"3571CC79E26E46F896A5E66F59FA973C","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[],"source":["# 定义函数来构建和采样模型\n","def run_var_slope_model(non_centered = False):\n","\n","    #定义数据坐标，包括站点和观测索引\n","    coords = {\"site\": df_first5[\"Site\"].unique(),\n","            \"obs_id\": df_first5.obs_id}\n","\n","    with pm.Model(coords=coords) as model:\n","        #定义全局参数\n","        beta_0 = pm.Normal(\"beta_0\", mu=0, sigma=50)\n","        beta_1 = pm.Normal(\"beta_1\", mu=0, sigma=5) \n","        beta_1_sigma = pm.Exponential(\"beta_1_sigma\", 1)\n","        sigma_y = pm.Exponential(\"sigma_y\", 1) \n","\n","        #传入自变量、获得观测值对应的站点映射\n","        x = pm.MutableData(\"x\", df_first5.stress, dims=\"obs_id\")\n","        site = pm.MutableData(\"site\", df_first5.site_idx, dims=\"obs_id\") \n","\n","        #选择不同的模型定义方式\n","        if non_centered:\n","            beta_1_offset = pm.Normal(\"beta_1_offset\", 0, sigma=1, dims=\"site\")\n","            beta_1j = pm.Deterministic(\"beta_1j\", beta_1 + beta_1_offset * beta_1_sigma, dims=\"site\")\n","        else:\n","            beta_1j = pm.Normal(\"beta_1j\", mu=beta_1, sigma=beta_1_sigma, dims=\"site\")\n","\n","        #线性关系\n","        mu = pm.Deterministic(\"mu\", beta_0+beta_1j[site]*x, dims=\"obs_id\")\n","\n","        # 定义 likelihood\n","        likelihood = pm.Normal(\"y_est\", mu=mu, sigma=sigma_y, observed=df_first5.scontrol, dims=\"obs_id\")\n","\n","        trace = pm.sample(draws=5000,           # 使用mcmc方法进行采样，draws为采样次数\n","                            tune=1000,                    # tune为调整采样策略的次数，可以决定这些结果是否要被保留\n","                            chains=4,                     # 链数\n","                            discard_tuned_samples= True,  # tune的结果将在采样结束后被丢弃\n","                            random_seed=84735,\n","                            target_accept=0.99)\n","    \n","    return model, trace"]},{"cell_type":"code","execution_count":66,"metadata":{"collapsed":false,"id":"87D6A53083FD431D865F4CA9BE43CDC9","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Auto-assigning NUTS sampler...\n","Initializing NUTS using jitter+adapt_diag...\n","Multiprocess sampling (4 chains in 4 jobs)\n","NUTS: [beta_0, beta_1, beta_1_sigma, sigma_y, beta_1_offset]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 110 seconds.\n","There were 1 divergences after tuning. Increase `target_accept` or reparameterize.\n"]}],"source":["# 注意，以下代码可能运行5分钟左右\n","\n","var_slope_model, var_slope_trace = run_var_slope_model(non_centered = True)"]},{"cell_type":"code","execution_count":67,"metadata":{"collapsed":false,"id":"C83AE3218E8A4AB295646B5ED90641B8","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/F08E48EA88924F15814712744B81F70E/s5wkxti47e.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e1fd6b550>"]},"execution_count":67,"metadata":{},"output_type":"execute_result"}],"source":["pm.model_to_graphviz(var_slope_model)"]},{"cell_type":"markdown","metadata":{"id":"925833EF5131463396E19B325C1EAE0E","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["###  MCMC采样&后验参数估计  \n","\n","* 可以看到5条回归线的截距 $\\beta_{0j}$ 一致，但是斜率$\\beta_{1j}$ 不同  \n","* $\\beta_{1j}$ 在总体$\\beta_{1}$ 上增加了变异"]},{"cell_type":"code","execution_count":68,"metadata":{"collapsed":false,"id":"386C79A5EE844718A84B2E733233CEDA","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>mean</th>\n","      <th>sd</th>\n","      <th>hdi_3%</th>\n","      <th>hdi_97%</th>\n","      <th>mcse_mean</th>\n","      <th>mcse_sd</th>\n","      <th>ess_bulk</th>\n","      <th>ess_tail</th>\n","      <th>r_hat</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>beta_0</th>\n","      <td>62.554</td>\n","      <td>1.932</td>\n","      <td>59.002</td>\n","      <td>66.275</td>\n","      <td>0.021</td>\n","      <td>0.015</td>\n","      <td>8700.0</td>\n","      <td>10803.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1j[Kassel]</th>\n","      <td>-0.538</td>\n","      <td>0.050</td>\n","      <td>-0.634</td>\n","      <td>-0.446</td>\n","      <td>0.001</td>\n","      <td>0.000</td>\n","      <td>8759.0</td>\n","      <td>11890.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1j[Portugal]</th>\n","      <td>-0.469</td>\n","      <td>0.065</td>\n","      <td>-0.594</td>\n","      <td>-0.348</td>\n","      <td>0.001</td>\n","      <td>0.001</td>\n","      <td>6650.0</td>\n","      <td>9053.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1j[Southampton]</th>\n","      <td>-0.569</td>\n","      <td>0.068</td>\n","      <td>-0.694</td>\n","      <td>-0.440</td>\n","      <td>0.001</td>\n","      <td>0.000</td>\n","      <td>10818.0</td>\n","      <td>13388.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1j[Tsinghua]</th>\n","      <td>-0.573</td>\n","      <td>0.048</td>\n","      <td>-0.665</td>\n","      <td>-0.483</td>\n","      <td>0.001</td>\n","      <td>0.000</td>\n","      <td>9192.0</td>\n","      <td>11322.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1j[UCSB]</th>\n","      <td>-0.574</td>\n","      <td>0.047</td>\n","      <td>-0.662</td>\n","      <td>-0.484</td>\n","      <td>0.000</td>\n","      <td>0.000</td>\n","      <td>9427.0</td>\n","      <td>11888.0</td>\n","      <td>1.0</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                        mean     sd  hdi_3%  hdi_97%  mcse_mean  mcse_sd  \\\n","beta_0                62.554  1.932  59.002   66.275      0.021    0.015   \n","beta_1j[Kassel]       -0.538  0.050  -0.634   -0.446      0.001    0.000   \n","beta_1j[Portugal]     -0.469  0.065  -0.594   -0.348      0.001    0.001   \n","beta_1j[Southampton]  -0.569  0.068  -0.694   -0.440      0.001    0.000   \n","beta_1j[Tsinghua]     -0.573  0.048  -0.665   -0.483      0.001    0.000   \n","beta_1j[UCSB]         -0.574  0.047  -0.662   -0.484      0.000    0.000   \n","\n","                      ess_bulk  ess_tail  r_hat  \n","beta_0                  8700.0   10803.0    1.0  \n","beta_1j[Kassel]         8759.0   11890.0    1.0  \n","beta_1j[Portugal]       6650.0    9053.0    1.0  \n","beta_1j[Southampton]   10818.0   13388.0    1.0  \n","beta_1j[Tsinghua]       9192.0   11322.0    1.0  \n","beta_1j[UCSB]           9427.0   11888.0    1.0  "]},"execution_count":68,"metadata":{},"output_type":"execute_result"}],"source":["var_slope_para = az.summary(var_slope_trace,\n","                            var_names=[\"beta_0\",\"beta_1j\"],\n","                            filter_vars=\"like\")\n","var_slope_para "]},{"cell_type":"code","execution_count":69,"metadata":{"collapsed":false,"id":"2380F1268A2A48CD89329CEE70F134DE","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/plain":["array([<Axes: title={'center': '94.0% HDI'}>], dtype=object)"]},"execution_count":69,"metadata":{},"output_type":"execute_result"},{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/ECF261A18E8847A4B5BBCCD2D798E169/s5wkxttush.png\">"],"text/plain":["<Figure size 600x560 with 1 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["az.plot_forest(var_slope_trace,\n","           var_names=[\"~mu\", \"~sigma\", \"~offset\", \"~beta_0\"],\n","           filter_vars=\"like\",\n","           combined = True)"]},{"cell_type":"markdown","metadata":{"id":"81C6B3B98E8E43369935AF495331338B","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 后验预测回归线  \n","\n","* 5条回归线的截距相同，但是斜率不同"]},{"cell_type":"code","execution_count":70,"metadata":{"collapsed":false,"id":"1E90255CC9E74201AB8A33D9E535DCAA","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"skip"},"tags":[],"trusted":true},"outputs":[],"source":["#定义函数，绘制不同站点下的后验预测回归线\n","def plot_partial_regression(data, trace, group_index):\n","    # 定义画布，根据站点数量定义画布的列数\n","    fig, ax = plt.subplots(1,len(data[\"Site\"].unique()), \n","                       sharex=True,\n","                       sharey=True,\n","                       figsize=(15,5))\n","    \n","    # 根据站点数来分别绘图\n","    # 我们需要的数据有原始数据，每一个因变量的后验预测均值\n","    # 这些数据都储存在后验参数采样结果中，也就是这里所用的trace\n","    for i, group in enumerate(data[\"Site\"].unique()):\n","        #绘制真实数据的散点图\n","        x = trace.constant_data.x.sel(obs_id = group_index[f\"{group}\"])\n","        y = trace.observed_data.y_est.sel(obs_id = group_index[f\"{group}\"])\n","        mu = trace.posterior.mu.sel(obs_id = group_index[f\"{group}\"])\n","        ax[i].scatter(x, y,\n","                color=f\"C{i}\",\n","                alpha=0.5)\n","        #绘制回归线\n","        ax[i].plot(x, mu.stack(sample=(\"chain\",\"draw\")).mean(dim=\"sample\"),\n","                color=f\"C{i}\",\n","                alpha=0.5)\n","        ax[i].set_title(f\"Slope: {var_slope_para.loc[f'beta_1j[{group}]']['mean']}\", fontsize=12)\n","        #绘制预测值95%HDI\n","        az.plot_hdi(\n","            x, mu,\n","            hdi_prob=0.95,\n","            fill_kwargs={\"alpha\": 0.25, \"linewidth\": 0},\n","            color=f\"C{i}\",\n","            ax=ax[i])\n","        \n","    # 生成横坐标名称\n","    fig.text(0.5, 0, 'Stress', ha='center', va='center', fontsize=12)\n","    # 生成纵坐标名称\n","    fig.text(0.08, 0.5, 'Self control', ha='center', va='center', rotation='vertical', fontsize=12)\n","    # 生成标题\n","    plt.suptitle(\"Posterior regression models(varing slope)\", fontsize=15, y=1.05)\n","        \n","    sns.despine()"]},{"cell_type":"code","execution_count":71,"metadata":{"collapsed":false,"id":"DE1E607DBA94448F8198952E1F07CEF9","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/2B2D4FD4EA5D4F8897B1AB2062437AD8/s5wkxv6w0q.png\">"],"text/plain":["<Figure size 1500x500 with 5 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["plot_partial_regression(data=df_first5,\n","                trace=var_slope_trace,\n","                group_index=first5_index)"]},{"cell_type":"markdown","metadata":{"id":"6737756241DE49CC90D5352BF8A77ABD","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 组间方差与组内方差  \n","\n","* 在这个模型定义中，组间方差来自`beta_1_offset`，组内方差来自`sigma_y`"]},{"cell_type":"code","execution_count":72,"metadata":{"collapsed":false,"id":"F348812180814B779DBA669FB923D470","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stdout","output_type":"stream","text":["被组间方差所解释的部分： 0.04608346045572735\n","被组内方差所解释的部分： 0.9539165395442726\n","组内相关： 0.04608346045572735\n"]}],"source":["# 提取组间和组内变异\n","para_sum = az.summary(var_slope_trace,\n","                      var_names=[\"_offset\",\"sigma_\"],\n","                      filter_vars=\"like\")\n","between_sd = (para_sum.filter(like='_offset', axis=0)[\"mean\"]**2).sum()\n","within_sd = para_sum.loc['sigma_y','mean']**2\n","# 计算变异占比\n","var = between_sd + within_sd\n","print(\"被组间方差所解释的部分：\", between_sd/var)\n","print(\"被组内方差所解释的部分：\", within_sd/var)\n","print(\"组内相关：\",between_sd/var)"]},{"cell_type":"markdown","metadata":{"id":"C4087D159D5C4C74AB47374C566B914F","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["## Model3: Hierarchical model with varying intercepts & slopes  \n","\n","模型1 和模型2分别考虑了截距和斜率随着站点的变化，在模型3中我们将同时考虑截距和斜率在不同站点间的差异  \n","\n","$$  \n","\\beta_{0j} | \\beta_0, \\sigma_0 \\sim N(\\beta_0, \\sigma_0^2)  \n","\\;\\;\\;\\; \\text{ and } \\;\\;\\;\\;  \n","\\beta_{1j} | \\beta_1, \\sigma_1 \\sim N(\\beta_1, \\sigma_1^2)  \n","$$  \n","\n","**总结模型定义：**  \n","\n","$$  \n","\\begin{array}{rll}  \n","Y_{ij} | \\beta_{0j}, \\beta_{1j}, \\sigma_y & \\sim N(\\mu_{ij}, \\sigma_y^2) \\;\\; \\text{ with } \\;\\;  \\mu_{ij} = \\beta_{0j} + \\beta_{1j} X_{ij} & \\text{(每个站点内的线性模型)} \\\\  \n","\\beta_{0j} | \\beta_0, \\sigma_0  & \\stackrel{ind}{\\sim} N(\\beta_0, \\sigma_0^2) & \\text{(截距在站点间的变化)} \\\\  \n","\\beta_{1j} | \\beta_1, \\sigma_1  & \\stackrel{ind}{\\sim} N(\\beta_1, \\sigma_1^2) & \\text{(斜率在站点间的变化)} \\\\  \n","\\beta_{0}  & \\sim N(0, 50^2) & \\text{(全局参数的先验)} \\\\  \n","\\beta_1  & \\sim N(0, 5^2) & \\\\  \n","\\sigma_0 & \\sim \\text{Exp}(1)    & \\\\  \n","\\sigma_1 & \\sim \\text{Exp}(1)    & \\\\  \n","\\sigma_y & \\sim \\text{Exp}(1).    & \\\\  \n","\\end{array}  \n","$$  \n","\n","或：  \n","$$  \n","\\begin{array}{rll}  \n","Y_{ij} | \\beta_{0}, \\beta_{1j}, \\sigma_y & \\sim N(\\mu_{ij}, \\sigma_y^2) \\;\\; \\text{ with } \\;\\;  \\mu_{ij} = (\\beta_{0} +b_{0j}) + (\\beta_{1} + b_{1j}) X_{ij} & \\text{(每个站点内的线性模型)} \\\\  \n","b_{0j} | \\sigma_0 & \\stackrel{ind}{\\sim} N(0, \\sigma_0^2) & \\text{(截距在站点间的变化)} \\\\  \n","b_{1j} | \\sigma_1 & \\stackrel{ind}{\\sim} N(0, \\sigma_1^2) & \\text{(斜率在站点间的变化)} \\\\  \n","\\beta_{0}  & \\sim N(0, 50^2) & \\text{(全局参数的先验)} \\\\  \n","\\beta_1  & \\sim N(0, 5^2) & \\\\  \n","\\sigma_y & \\sim \\text{Exp}(1)    & \\\\  \n","\\sigma_0 & \\sim \\text{Exp}(1)    & \\\\  \n","\\sigma_1 & \\sim \\text{Exp}(1).    & \\\\  \n","\\end{array}  \n","$$  \n"]},{"cell_type":"markdown","metadata":{"id":"E6063D5F136643979F7D00F515FE746D","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["**分层模型与非池化模型的对比**  \n","\n","$$  \n","\\beta_0 \\sim N(0, 50)\\\\  \n","\\sigma_0 \\sim \\text{Exp}(1)\\\\  \n","\\beta_1 \\sim N(0,5)\\\\  \n","\\sigma_1 \\sim \\text{Exp}(1)  \n","$$  \n","\n","* 在非池化模型中，我们认为截距、斜率和变异在不同站点间是不同的；  \n","* 但在层级模型中，我们仍考虑了来自总体的的信息，即不同站点间的斜率/截距仍是从总体斜率/截距中抽样的。  \n","\t* 注意，在层级模型中一般不会假设*变异会随着分组变量变化*，这也是分层模型和非池化模型的重要区别。  \n"]},{"cell_type":"code","execution_count":73,"metadata":{"collapsed":false,"id":"1C0FC3AB5EA544C2B4407391484835D7","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[],"source":["# 定义函数来构建和采样模型\n","def run_var_both_model(non_centered = False):\n","\n","    #定义数据坐标，包括站点和观测索引\n","    coords = {\"site\": df_first5[\"Site\"].unique(),\n","            \"obs_id\": df_first5.obs_id}\n","\n","    with pm.Model(coords=coords) as model:\n","        #定义全局参数\n","        beta_0 = pm.Normal(\"beta_0\", mu=0, sigma=50)\n","        beta_0_sigma = pm.Exponential(\"beta_0_sigma\", 1)\n","        beta_1 = pm.Normal(\"beta_1\", mu=0, sigma=5) \n","        beta_1_sigma = pm.Exponential(\"beta_1_sigma\", 1)\n","        sigma_y = pm.Exponential(\"sigma_y\", 1) \n","\n","        #传入自变量、获得观测值对应的站点映射\n","        x = pm.MutableData(\"x\", df_first5.stress, dims=\"obs_id\")\n","        site = pm.MutableData(\"site\", df_first5.site_idx, dims=\"obs_id\") \n","\n","        #选择不同的模型定义方式\n","        if non_centered:\n","            beta_0_offset = pm.Normal(\"beta_0_offset\", 0, sigma=1, dims=\"site\")\n","            beta_0j = pm.Deterministic(\"beta_0j\", beta_0 + beta_0_offset * beta_0_sigma, dims=\"site\")\n","            beta_1_offset = pm.Normal(\"beta_1_offset\", 0, sigma=1, dims=\"site\")\n","            beta_1j = pm.Deterministic(\"beta_1j\", beta_1 + beta_1_offset * beta_1_sigma, dims=\"site\")\n","        else:\n","            beta_0j = pm.Normal(\"beta_0j\", mu=beta_0, sigma=beta_0_sigma, dims=\"site\")\n","            beta_1j = pm.Normal(\"beta_1j\", mu=beta_1, sigma=beta_1_sigma, dims=\"site\")\n","\n","        #线性关系\n","        mu = pm.Deterministic(\"mu\", beta_0j[site]+beta_1j[site]*x, dims=\"obs_id\")\n","\n","        # 定义 likelihood\n","        likelihood = pm.Normal(\"y_est\", mu=mu, sigma=sigma_y, observed=df_first5.scontrol, dims=\"obs_id\")\n","\n","        trace = pm.sample(draws=5000,           # 使用mcmc方法进行采样，draws为采样次数\n","                            tune=1000,                    # tune为调整采样策略的次数，可以决定这些结果是否要被保留\n","                            chains=4,                     # 链数\n","                            discard_tuned_samples= True,  # tune的结果将在采样结束后被丢弃\n","                            random_seed=84735,\n","                            target_accept=0.99)\n","    \n","    return model, trace"]},{"cell_type":"code","execution_count":74,"metadata":{"collapsed":false,"id":"2146C98C9F1E42219F5E59B7722D8882","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Auto-assigning NUTS sampler...\n","Initializing NUTS using jitter+adapt_diag...\n","Multiprocess sampling (4 chains in 4 jobs)\n","NUTS: [beta_0, beta_0_sigma, beta_1, beta_1_sigma, sigma_y, beta_0_offset, beta_1_offset]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 184 seconds.\n","There were 7 divergences after tuning. Increase `target_accept` or reparameterize.\n"]}],"source":["# 注意，以下代码可能运行10分钟左右\n","\n","var_both_model, var_both_trace = run_var_both_model(non_centered = True)"]},{"cell_type":"code","execution_count":75,"metadata":{"collapsed":false,"id":"E55DAD2EF50E4EC0B14CC689B6E958AB","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/0775F1AD3C394BA9A4BD43C6A11D9B4A/s5wl3doe31.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e1284a2b0>"]},"execution_count":75,"metadata":{},"output_type":"execute_result"}],"source":["pm.model_to_graphviz(var_both_model)"]},{"cell_type":"markdown","metadata":{"id":"7B4D401B5CEE4699B27B1FAA862DF8CD","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["###  MCMC采样&后验参数估计  \n","\n","* 可以看到5条回归线的斜率$\\beta_{1j}$、截距$\\beta_{0j}$都是不同的  \n","* $\\beta_{1j}$、$\\beta_{0j}$是在总体$\\beta_{1}$、$\\beta_{0}$上增加了一些变异"]},{"cell_type":"code","execution_count":76,"metadata":{"collapsed":false,"id":"453FABDAC7864C8BB3D6223DD6926A9D","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>mean</th>\n","      <th>sd</th>\n","      <th>hdi_3%</th>\n","      <th>hdi_97%</th>\n","      <th>mcse_mean</th>\n","      <th>mcse_sd</th>\n","      <th>ess_bulk</th>\n","      <th>ess_tail</th>\n","      <th>r_hat</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>beta_0j[Kassel]</th>\n","      <td>63.167</td>\n","      <td>2.155</td>\n","      <td>59.211</td>\n","      <td>67.271</td>\n","      <td>0.018</td>\n","      <td>0.013</td>\n","      <td>14939.0</td>\n","      <td>14374.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[Portugal]</th>\n","      <td>63.805</td>\n","      <td>2.611</td>\n","      <td>59.138</td>\n","      <td>68.908</td>\n","      <td>0.027</td>\n","      <td>0.019</td>\n","      <td>9768.0</td>\n","      <td>13221.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[Southampton]</th>\n","      <td>62.516</td>\n","      <td>2.418</td>\n","      <td>57.956</td>\n","      <td>67.008</td>\n","      <td>0.018</td>\n","      <td>0.013</td>\n","      <td>17485.0</td>\n","      <td>14642.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[Tsinghua]</th>\n","      <td>61.829</td>\n","      <td>2.152</td>\n","      <td>57.911</td>\n","      <td>66.012</td>\n","      <td>0.017</td>\n","      <td>0.012</td>\n","      <td>15995.0</td>\n","      <td>14840.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[UCSB]</th>\n","      <td>62.983</td>\n","      <td>2.195</td>\n","      <td>58.723</td>\n","      <td>67.002</td>\n","      <td>0.017</td>\n","      <td>0.012</td>\n","      <td>16092.0</td>\n","      <td>14383.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1j[Kassel]</th>\n","      <td>-0.553</td>\n","      <td>0.054</td>\n","      <td>-0.653</td>\n","      <td>-0.451</td>\n","      <td>0.000</td>\n","      <td>0.000</td>\n","      <td>15507.0</td>\n","      <td>14851.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1j[Portugal]</th>\n","      <td>-0.496</td>\n","      <td>0.074</td>\n","      <td>-0.630</td>\n","      <td>-0.359</td>\n","      <td>0.001</td>\n","      <td>0.001</td>\n","      <td>8478.0</td>\n","      <td>13434.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1j[Southampton]</th>\n","      <td>-0.571</td>\n","      <td>0.069</td>\n","      <td>-0.701</td>\n","      <td>-0.439</td>\n","      <td>0.001</td>\n","      <td>0.000</td>\n","      <td>18669.0</td>\n","      <td>15095.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1j[Tsinghua]</th>\n","      <td>-0.557</td>\n","      <td>0.053</td>\n","      <td>-0.654</td>\n","      <td>-0.454</td>\n","      <td>0.000</td>\n","      <td>0.000</td>\n","      <td>16720.0</td>\n","      <td>15209.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1j[UCSB]</th>\n","      <td>-0.583</td>\n","      <td>0.053</td>\n","      <td>-0.682</td>\n","      <td>-0.485</td>\n","      <td>0.000</td>\n","      <td>0.000</td>\n","      <td>16193.0</td>\n","      <td>14467.0</td>\n","      <td>1.0</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                        mean     sd  hdi_3%  hdi_97%  mcse_mean  mcse_sd  \\\n","beta_0j[Kassel]       63.167  2.155  59.211   67.271      0.018    0.013   \n","beta_0j[Portugal]     63.805  2.611  59.138   68.908      0.027    0.019   \n","beta_0j[Southampton]  62.516  2.418  57.956   67.008      0.018    0.013   \n","beta_0j[Tsinghua]     61.829  2.152  57.911   66.012      0.017    0.012   \n","beta_0j[UCSB]         62.983  2.195  58.723   67.002      0.017    0.012   \n","beta_1j[Kassel]       -0.553  0.054  -0.653   -0.451      0.000    0.000   \n","beta_1j[Portugal]     -0.496  0.074  -0.630   -0.359      0.001    0.001   \n","beta_1j[Southampton]  -0.571  0.069  -0.701   -0.439      0.001    0.000   \n","beta_1j[Tsinghua]     -0.557  0.053  -0.654   -0.454      0.000    0.000   \n","beta_1j[UCSB]         -0.583  0.053  -0.682   -0.485      0.000    0.000   \n","\n","                      ess_bulk  ess_tail  r_hat  \n","beta_0j[Kassel]        14939.0   14374.0    1.0  \n","beta_0j[Portugal]       9768.0   13221.0    1.0  \n","beta_0j[Southampton]   17485.0   14642.0    1.0  \n","beta_0j[Tsinghua]      15995.0   14840.0    1.0  \n","beta_0j[UCSB]          16092.0   14383.0    1.0  \n","beta_1j[Kassel]        15507.0   14851.0    1.0  \n","beta_1j[Portugal]       8478.0   13434.0    1.0  \n","beta_1j[Southampton]   18669.0   15095.0    1.0  \n","beta_1j[Tsinghua]      16720.0   15209.0    1.0  \n","beta_1j[UCSB]          16193.0   14467.0    1.0  "]},"execution_count":76,"metadata":{},"output_type":"execute_result"}],"source":["var_both_para = az.summary(var_both_trace,\n","                            var_names=[\"beta_0j\",\"beta_1j\"],\n","                            filter_vars=\"like\")\n","var_both_para"]},{"cell_type":"code","execution_count":77,"metadata":{"collapsed":false,"id":"AA74F81CA5594015999D4BDE05A3B1E9","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/6A3E200089424D6AB6FCFFA803B1B108/s5wl3e7fc3.png\">"],"text/plain":["<Figure size 2000x500 with 2 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["# 设置绘图坐标\n","figs, (ax1, ax2) = plt.subplots(1,2, figsize = (20,5))\n","# 绘制变化的截距\n","az.plot_forest(var_both_trace,\n","           var_names=[\"~mu\", \"~sigma\", \"~offset\", \"~beta_1\"],\n","           filter_vars=\"like\",\n","           combined = True,\n","           ax=ax1)\n","# 绘制变化的斜率\n","az.plot_forest(var_both_trace,\n","           var_names=[\"~mu\", \"~sigma\", \"~offset\", \"~beta_0\"],\n","           filter_vars=\"like\",\n","           combined = True,\n","           ax=ax2)\n","plt.show()"]},{"cell_type":"markdown","metadata":{"id":"5275884A57CD48EFA824A839BCAF43A6","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 后验预测回归线  \n","* 5条回归线的截距、斜率都是不同的"]},{"cell_type":"code","execution_count":78,"metadata":{"collapsed":false,"id":"52661C1B199C4410BD842E54FDE1892E","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"skip"},"tags":[],"trusted":true},"outputs":[],"source":["#定义函数，绘制不同站点下的后验预测回归线\n","def plot_partial_regression(data, trace, group_index):\n","    # 定义画布，根据站点数量定义画布的列数\n","    fig, ax = plt.subplots(1,len(data[\"Site\"].unique()), \n","                       sharex=True,\n","                       sharey=True,\n","                       figsize=(15,5))\n","    \n","    # 根据站点数来分别绘图\n","    # 我们需要的数据有原始数据，每一个因变量的后验预测均值\n","    # 这些数据都储存在后验参数采样结果中，也就是这里所用的trace\n","    for i, group in enumerate(data[\"Site\"].unique()):\n","        #绘制真实数据的散点图\n","        x = trace.constant_data.x.sel(obs_id = group_index[f\"{group}\"])\n","        y = trace.observed_data.y_est.sel(obs_id = group_index[f\"{group}\"])\n","        mu = trace.posterior.mu.sel(obs_id = group_index[f\"{group}\"])\n","        ax[i].scatter(x, y,\n","                color=f\"C{i}\",\n","                alpha=0.5)\n","        #绘制回归线\n","        ax[i].plot(x, mu.stack(sample=(\"chain\",\"draw\")).mean(dim=\"sample\"),\n","                color=f\"C{i}\",\n","                alpha=0.5)\n","        ax[i].set_title(f\"Slope: {var_both_para.loc[f'beta_1j[{group}]']['mean']}\\nIntercept: {var_both_para.loc[f'beta_0j[{group}]']['mean']}\", \n","        fontsize=12)\n","        #绘制预测值95%HDI\n","        az.plot_hdi(\n","            x, mu,\n","            hdi_prob=0.95,\n","            fill_kwargs={\"alpha\": 0.25, \"linewidth\": 0},\n","            color=f\"C{i}\",\n","            ax=ax[i])\n","        \n","    # 生成横坐标名称\n","    fig.text(0.5, 0, 'Stress', ha='center', va='center', fontsize=12)\n","    # 生成纵坐标名称\n","    fig.text(0.08, 0.5, 'Self control', ha='center', va='center', rotation='vertical', fontsize=12)\n","    # 生成标题\n","    plt.suptitle(\"Posterior regression models(varing slope and intercept)\", fontsize=15, y=1.05)\n","        \n","    sns.despine()\n"]},{"cell_type":"code","execution_count":79,"metadata":{"collapsed":false,"id":"B7F0D52A9AF44E69A46BB235B5EFA2DA","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/1EB5C343732C408BBD91633D245FAA73/s5wl3gfrc0.png\">"],"text/plain":["<Figure size 1500x500 with 5 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["plot_partial_regression(data=df_first5,\n","                trace=var_both_trace,\n","                group_index=first5_index)"]},{"cell_type":"markdown","metadata":{"id":"E3D5B060BA9644F1A73DFF26E2046A99","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 组间方差与组内方差  \n","\n","* 在这个模型定义中，组间方差来自`beta_0_offset`、`beta_1_offset`，组内方差来自`sigma_y`"]},{"cell_type":"code","execution_count":80,"metadata":{"collapsed":false,"id":"A530EB5CC6FC4B2ABCAD0280A07F7A1C","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stdout","output_type":"stream","text":["被组间方差所解释的部分： 0.04630475826414934\n","被组内方差所解释的部分： 0.9536952417358506\n","组内相关： 0.04630475826414934\n"]}],"source":["# 提取组间和组内变异\n","para_sum = az.summary(var_both_trace,\n","                      var_names=[\"_offset\",\"sigma_\"],\n","                      filter_vars=\"like\")\n","between_sd = (para_sum.filter(like='_offset', axis=0)[\"mean\"]**2).sum()\n","within_sd = para_sum.loc['sigma_y','mean']**2\n","# 计算变异占比\n","var = between_sd + within_sd\n","print(\"被组间方差所解释的部分：\", between_sd/var)\n","print(\"被组内方差所解释的部分：\", within_sd/var)\n","print(\"组内相关：\",between_sd/var)\n"]},{"cell_type":"markdown","metadata":{"id":"A78AC368B8D449199DFF25860642A0FB","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["## 评估后验预测  \n","\n","* 在之前的课程中，我们介绍过对后验预测结果进行评估的两种方法  \n","\n","* 一是**MAE**，即后验预测值与真实值之间预测误差的中位数，二是**within_95**，即真实值是否落在95%后验预测区间内  \n","\n","* 在这里我们调用之前写过的计算两种指标的方法，评估四个模型的后验预测结果"]},{"cell_type":"code","execution_count":81,"metadata":{"collapsed":false,"id":"AD7DE1DB781B40CF95C59F95BDE6B420","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Sampling: [y_est]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling: [y_est]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling: [y_est]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling: [y_est]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling: [y_est]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"}],"source":["# 进行后验预测\n","complete_ppc = pm.sample_posterior_predictive(complete_trace, \n","                                            model = complete_pooled_model,\n","                                            random_seed=84735)\n","no_ppc = pm.sample_posterior_predictive(no_trace, \n","                                        model = no_pooled_model,\n","                                        random_seed=84735)   \n","var_inter_ppc = pm.sample_posterior_predictive(var_inter_trace,\n","                                                model = var_inter_model,\n","                                                random_seed=84735)\n","var_slope_ppc = pm.sample_posterior_predictive(var_slope_trace,\n","                                                model = var_slope_model,\n","                                                random_seed=84735)                                                                                       \n","var_both_ppc = pm.sample_posterior_predictive(var_both_trace, \n","                                            model = var_both_model,\n","                                            random_seed=84735)"]},{"cell_type":"code","execution_count":82,"metadata":{"collapsed":false,"id":"CF761A487AD84948893C6F53AF1B2636","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"skip"},"tags":[],"trusted":true},"outputs":[],"source":["# 定义计算 MAE 函数\n","from statistics import median\n","def MAE(model_ppc):\n","    # 计算每个X取值下对应的后验预测模型的均值\n","    pre_x = model_ppc.posterior_predictive[\"y_est\"].stack(sample=(\"chain\", \"draw\"))\n","    pre_y_mean = pre_x.mean(axis=1).values\n","\n","    # 提取观测值Y，提取对应Y值下的后验预测模型的均值\n","    MAE = pd.DataFrame({\n","        \"scontrol_ppc_mean\": pre_y_mean,\n","        \"scontrol_original\": model_ppc.observed_data.y_est.values\n","    })\n","\n","    # 计算预测误差\n","    MAE[\"pre_error\"] = abs(MAE[\"scontrol_original\"] -\\\n","                            MAE[\"scontrol_ppc_mean\"])\n","\n","    # 最后，计算预测误差的中位数\n","    MAE = median(MAE.pre_error)\n","    return MAE\n"]},{"cell_type":"code","execution_count":83,"metadata":{"collapsed":false,"id":"130A48BAE0CA4FD982DCB6BAD1C1FFA5","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"skip"},"tags":[],"trusted":true},"outputs":[],"source":["# 定义\n","def counter_outlier(model_ppc, hdi_prob=0.95):\n","    # 将az.summary生成的结果存到hdi_multi这个变量中，该变量为数据框\n","    hdi = az.summary(model_ppc, kind=\"stats\", hdi_prob=hdi_prob)\n","    lower = hdi.iloc[:,2].values\n","    upper = hdi.iloc[:,3].values\n","\n","    # 将原数据中的自我控制分数合并，便于后续进行判断\n","    y_obs = model_ppc.observed_data[\"y_est\"].values\n","\n","    # 判断原数据中的压力分数是否在后验预测的95%可信区间内，并计数\n","    hdi[\"verify\"] = (y_obs <= lower) | (y_obs >= upper)\n","    hdi[\"y_obs\"] = y_obs\n","    hdi_num = sum(hdi[\"verify\"])\n","\n","    return hdi_num"]},{"cell_type":"code","execution_count":84,"metadata":{"collapsed":false,"id":"5CAABAB5F9344430A2483650BF32D16C","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>Model</th>\n","      <th>MAE</th>\n","      <th>Outliers</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>完全池化</td>\n","      <td>3.931585</td>\n","      <td>24</td>\n","    </tr>\n","    <tr>\n","      <th>1</th>\n","      <td>部分池化</td>\n","      <td>3.820402</td>\n","      <td>23</td>\n","    </tr>\n","    <tr>\n","      <th>2</th>\n","      <td>变化截距</td>\n","      <td>3.946004</td>\n","      <td>21</td>\n","    </tr>\n","    <tr>\n","      <th>3</th>\n","      <td>变化斜率</td>\n","      <td>3.961370</td>\n","      <td>17</td>\n","    </tr>\n","    <tr>\n","      <th>4</th>\n","      <td>变化截距、斜率</td>\n","      <td>3.904573</td>\n","      <td>19</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["     Model       MAE  Outliers\n","0     完全池化  3.931585        24\n","1     部分池化  3.820402        23\n","2     变化截距  3.946004        21\n","3     变化斜率  3.961370        17\n","4  变化截距、斜率  3.904573        19"]},"execution_count":84,"metadata":{},"output_type":"execute_result"}],"source":["# 将每个模型的PPC储存为列表\n","ppc_samples_list = [complete_ppc, no_ppc, var_inter_ppc, var_slope_ppc, var_both_ppc]\n","model_names = [\"完全池化\", \"部分池化\", \"变化截距\", \"变化斜率\", \"变化截距、斜率\"]\n","\n","# 建立一个空列表来存储结果\n","results_list = []\n","\n","# 遍历模型并计算MAE和超出95%hdi的值\n","for model_name, ppc_samples in zip(model_names, ppc_samples_list):\n","    outliers = counter_outlier(ppc_samples)\n","    MAEs = MAE(ppc_samples)\n","    results_list.append({'Model': model_name, 'MAE':MAEs, 'Outliers': outliers})\n","\n","# 从结果列表创建一个DataFrame\n","results_df = pd.DataFrame(results_list)\n","\n","results_df\n"]},{"cell_type":"markdown","metadata":{"id":"C042A4F30D314BE9B75098BBAE598140","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["## Model comparison  \n","\n","从模型比较的结果，我们可以发现：  \n","* 同时包含变化截距和变化斜率的模型(model3)是最优模型，对应了我们的假设3。  \n","* 值得注意的是，非池化模型 (no pool model)同样考虑了不同站点间截距和斜率的变化，但是它仅比完全池化模型好一些。  \n","* 此外，所有模型的 elpd 都非常接近 (考虑到 se大于为15~16)，因此，模型比较的结果只能作为参考，更重要的是通过后验预测检验模型的性能。  \n","\n","模型假设：  \n","* H0(model 0)，普通线性模型，仅考虑压力对自我控制的影响。  \n","* H1(model 1)，变化截距模型，在模型0的基础上考虑自我控制在不同站点的变化。  \n","* H2(model 2)，变化斜率模型，在模型0的基础上不同站点间的压力影响的变化。  \n","* H3(model 3)，变化截距和斜率模型，结合模型1和模型2，同时考虑站点对自我控制以及压力影响的变化。"]},{"cell_type":"code","execution_count":85,"metadata":{"collapsed":false,"id":"AEA49358664348BF99D7F29509325D01","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"data":{"text/html":["\n","    <div>\n","      <progress value='4000' class='' max='4000' style='width:300px; height:20px; vertical-align: middle;'></progress>\n","      100.00% [4000/4000 00:00&lt;00:00]\n","    </div>\n","    "],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"data":{"text/html":["\n","    <div>\n","      <progress value='4000' class='' max='4000' style='width:300px; height:20px; vertical-align: middle;'></progress>\n","      100.00% [4000/4000 00:00&lt;00:00]\n","    </div>\n","    "],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"data":{"text/html":["\n","    <div>\n","      <progress value='20000' class='' max='20000' style='width:300px; height:20px; vertical-align: middle;'></progress>\n","      100.00% [20000/20000 00:00&lt;00:00]\n","    </div>\n","    "],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"data":{"text/html":["\n","    <div>\n","      <progress value='20000' class='' max='20000' style='width:300px; height:20px; vertical-align: middle;'></progress>\n","      100.00% [20000/20000 00:00&lt;00:00]\n","    </div>\n","    "],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"data":{"text/html":["\n","    <div>\n","      <progress value='20000' class='' max='20000' style='width:300px; height:20px; vertical-align: middle;'></progress>\n","      100.00% [20000/20000 00:01&lt;00:00]\n","    </div>\n","    "],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"data":{"text/html":["\n","            <div>\n","              <div class='xr-header'>\n","                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n","              </div>\n","              <ul class=\"xr-sections group-sections\">\n","              \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_posterior5e2aaccc-dd34-4248-b4bb-40e1a3222401\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_posterior5e2aaccc-dd34-4248-b4bb-40e1a3222401\" class = \"xr-section-summary\">posterior</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:        (chain: 4, draw: 5000, site: 5, obs_id: 415)\n","Coordinates:\n","  * chain          (chain) int64 0 1 2 3\n","  * draw           (draw) int64 0 1 2 3 4 5 6 ... 4994 4995 4996 4997 4998 4999\n","  * site           (site) &lt;U11 &#x27;Kassel&#x27; &#x27;Portugal&#x27; ... &#x27;Tsinghua&#x27; &#x27;UCSB&#x27;\n","  * obs_id         (obs_id) int64 0 1 2 3 4 5 6 ... 408 409 410 411 412 413 414\n","Data variables:\n","    beta_0         (chain, draw) float64 64.72 63.06 61.79 ... 65.06 64.73 63.83\n","    beta_1         (chain, draw) float64 -0.6279 -0.5358 ... -0.5393 -0.5428\n","    beta_0_offset  (chain, draw, site) float64 1.327 -1.979 ... -0.7901 -0.5411\n","    beta_1_offset  (chain, draw, site) float64 -0.1168 1.971 ... -1.131 -1.481\n","    beta_0_sigma   (chain, draw) float64 0.2362 0.3797 0.2435 ... 1.699 0.9418\n","    beta_1_sigma   (chain, draw) float64 0.07582 0.1157 ... 0.02431 0.03258\n","    sigma_y        (chain, draw) float64 6.48 6.125 6.614 ... 6.691 6.591 6.67\n","    beta_0j        (chain, draw, site) float64 65.03 64.25 65.19 ... 63.08 63.32\n","    beta_1j        (chain, draw, site) float64 -0.6367 -0.4785 ... -0.5911\n","    mu             (chain, draw, obs_id) float64 45.93 45.93 ... 36.13 45.59\n","Attributes:\n","    created_at:                 2023-12-19T07:35:31.513352\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0\n","    sampling_time:              184.01401925086975\n","    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-d1f8e634-b32e-4361-996d-48f3c182216b' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-d1f8e634-b32e-4361-996d-48f3c182216b' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>site</span>: 5</li><li><span class='xr-has-index'>obs_id</span>: 415</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-3ebfef04-111e-4e4a-8695-6eb394431f05' class='xr-section-summary-in' type='checkbox'  checked><label for='section-3ebfef04-111e-4e4a-8695-6eb394431f05' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-ec5f66b8-5f9f-41e3-be44-a74bc2a25d91' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ec5f66b8-5f9f-41e3-be44-a74bc2a25d91' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2784e75b-30a9-410f-86bd-d68bbf01a81e' class='xr-var-data-in' type='checkbox'><label for='data-2784e75b-30a9-410f-86bd-d68bbf01a81e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-b19d2963-9173-4dcc-b238-92a0fa089fdd' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b19d2963-9173-4dcc-b238-92a0fa089fdd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-28fd797a-21d3-4642-8ffc-25c334016902' class='xr-var-data-in' type='checkbox'><label for='data-28fd797a-21d3-4642-8ffc-25c334016902' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>site</span></div><div class='xr-var-dims'>(site)</div><div class='xr-var-dtype'>&lt;U11</div><div class='xr-var-preview xr-preview'>&#x27;Kassel&#x27; &#x27;Portugal&#x27; ... &#x27;UCSB&#x27;</div><input id='attrs-74679457-35e5-468e-92f8-039f49aa9073' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-74679457-35e5-468e-92f8-039f49aa9073' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-cadac3df-04a0-4f08-999b-c66ce6dca603' class='xr-var-data-in' type='checkbox'><label for='data-cadac3df-04a0-4f08-999b-c66ce6dca603' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;Kassel&#x27;, &#x27;Portugal&#x27;, &#x27;Southampton&#x27;, &#x27;Tsinghua&#x27;, &#x27;UCSB&#x27;], dtype=&#x27;&lt;U11&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 410 411 412 413 414</div><input id='attrs-6e4ab847-0d8b-4253-8976-2cf434f60210' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6e4ab847-0d8b-4253-8976-2cf434f60210' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-43600afd-e5bc-4adc-8198-5fca7a802d53' class='xr-var-data-in' type='checkbox'><label for='data-43600afd-e5bc-4adc-8198-5fca7a802d53' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 412, 413, 414])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-b55afec7-7363-4e5a-b445-70fb0f339733' class='xr-section-summary-in' type='checkbox'  checked><label for='section-b55afec7-7363-4e5a-b445-70fb0f339733' class='xr-section-summary' >Data variables: <span>(10)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>beta_0</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>64.72 63.06 61.79 ... 64.73 63.83</div><input id='attrs-70cc3779-5420-4711-884a-38d9abf95537' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-70cc3779-5420-4711-884a-38d9abf95537' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fa61557c-7c18-4877-9d8d-59e4b89ef458' class='xr-var-data-in' type='checkbox'><label for='data-fa61557c-7c18-4877-9d8d-59e4b89ef458' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[64.71922304, 63.0621471 , 61.79326145, ..., 63.10397497,\n","        62.44275561, 63.50120463],\n","       [61.90515858, 65.31912424, 60.71815171, ..., 63.95895558,\n","        61.06781421, 60.37778168],\n","       [62.38824464, 65.18970634, 63.89663111, ..., 62.59062737,\n","        64.03238532, 63.28582076],\n","       [65.88193751, 64.29277203, 66.05961826, ..., 65.06016127,\n","        64.72652915, 63.82714921]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.6279 -0.5358 ... -0.5393 -0.5428</div><input id='attrs-9877accb-0360-4d4c-9a88-4f70100ecf70' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9877accb-0360-4d4c-9a88-4f70100ecf70' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f1d46ae5-e86e-467d-b780-2784c9cd1ce5' class='xr-var-data-in' type='checkbox'><label for='data-f1d46ae5-e86e-467d-b780-2784c9cd1ce5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.6278873 , -0.5357842 , -0.53266063, ..., -0.4960945 ,\n","        -0.48906364, -0.5577741 ],\n","       [-0.50729126, -0.6290677 , -0.47705626, ..., -0.56917237,\n","        -0.60414197, -0.53104839],\n","       [-0.56075077, -0.62337504, -0.60231368, ..., -0.54372494,\n","        -0.63611068, -0.60990413],\n","       [-0.62292336, -0.62023602, -0.64455271, ..., -0.5636254 ,\n","        -0.53926594, -0.54281196]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_0_offset</span></div><div class='xr-var-dims'>(chain, draw, site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.327 -1.979 ... -0.7901 -0.5411</div><input id='attrs-187d2d4d-4b5e-4729-ba3a-a93e47298641' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-187d2d4d-4b5e-4729-ba3a-a93e47298641' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1b173bb2-13bc-411f-8e74-b0a501693c55' class='xr-var-data-in' type='checkbox'><label for='data-1b173bb2-13bc-411f-8e74-b0a501693c55' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[ 1.32667338, -1.97850166,  1.97617903,  0.13620081,\n","          0.33310764],\n","        [-1.86548456, -0.55513257,  0.69633692, -1.57038573,\n","         -1.40603514],\n","        [ 2.35105723,  0.61174314, -0.82853386,  1.14780313,\n","          1.46475823],\n","        ...,\n","        [ 0.20492637, -0.05143656,  0.12084281, -1.64230093,\n","         -1.08379446],\n","        [ 0.47530485,  2.38032878, -0.92269059, -0.46448327,\n","         -0.09386202],\n","        [ 0.85904532, -1.04971733, -0.43127172, -0.15994993,\n","          0.61388068]],\n","\n","       [[-0.08065371,  0.81167698, -0.70832612, -0.84578104,\n","         -1.91419108],\n","        [-0.22228136,  2.10648583, -0.46332743, -0.99108288,\n","         -0.1405043 ],\n","        [ 1.53572746, -1.33158103,  0.05776901,  0.23400592,\n","         -1.08356078],\n","...\n","        [ 0.39081649,  2.19262404, -1.39329471, -0.66539356,\n","         -0.6684484 ],\n","        [ 0.07591057,  0.77941513, -0.08971914, -1.01412012,\n","          1.26167366],\n","        [ 0.26465606,  0.92258567,  0.06579449, -1.03102325,\n","          1.14015871]],\n","\n","       [[-1.02882411,  0.79094257, -0.05516123, -0.41186644,\n","          0.46364762],\n","        [-0.49906379,  1.41058864, -0.98239459, -0.74957486,\n","          0.55722166],\n","        [-0.23034693,  0.93039978,  0.79506459, -0.99507855,\n","          0.16186423],\n","        ...,\n","        [ 0.05715928,  1.00446775,  0.21649051, -1.19675082,\n","         -0.63586618],\n","        [-0.65249549,  1.14500779, -0.77347439, -1.73470562,\n","         -0.82785013],\n","        [-0.51577739,  0.81728073, -1.51185964, -0.79008769,\n","         -0.54109863]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1_offset</span></div><div class='xr-var-dims'>(chain, draw, site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.1168 1.971 ... -1.131 -1.481</div><input id='attrs-6dca9478-a1f3-44ad-b99a-ccba2057954a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6dca9478-a1f3-44ad-b99a-ccba2057954a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4d115d5a-b7db-45f2-a8f1-44e7a690d9ca' class='xr-var-data-in' type='checkbox'><label for='data-4d115d5a-b7db-45f2-a8f1-44e7a690d9ca' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[-0.11680587,  1.97053053,  0.13905239,  0.03798578,\n","         -0.14201018],\n","        [ 0.21084032,  1.26080854, -0.99588967, -0.37586992,\n","         -0.06642985],\n","        [ 0.02737604,  1.10535547,  0.14435132, -0.92508084,\n","         -0.91902773],\n","        ...,\n","        [-1.08796166, -0.69171399, -0.35926015, -0.2756362 ,\n","         -0.73826136],\n","        [-0.78373857,  0.13565978, -0.31480432, -0.86365289,\n","         -0.92607408],\n","        [-0.10693659,  1.58800698, -0.67609246, -0.64197532,\n","         -0.73392303]],\n","\n","       [[-1.56947837,  0.04720917, -0.30292902,  0.39967377,\n","         -0.29768564],\n","        [ 1.8055232 , -0.27248334, -0.54710821,  1.10569589,\n","         -0.90738536],\n","        [-0.87355697,  0.87091266,  0.16424889, -1.42987601,\n","         -0.44505248],\n","...\n","        [-0.10232431, -0.30964215,  0.53685406, -0.88192987,\n","         -0.74477514],\n","        [ 1.33478048,  1.99003714, -0.23897733,  2.11435852,\n","         -0.44528213],\n","        [ 1.07793299,  1.83146648, -0.20126483,  2.32775372,\n","         -0.39725755]],\n","\n","       [[ 2.61023441,  1.4460974 ,  0.38934457,  0.07750867,\n","         -1.73361771],\n","        [ 1.23841748,  0.02130939, -1.38908298,  0.38399008,\n","         -0.1923434 ],\n","        [ 0.00525098,  1.61182346, -0.56462968, -0.38332726,\n","         -0.87074415],\n","        ...,\n","        [-0.91813684,  1.49820858, -1.1269059 , -1.2216306 ,\n","         -1.59085419],\n","        [-0.54241132,  1.04065432, -1.55303804, -0.88400839,\n","         -1.8910443 ],\n","        [-0.62611677,  1.20529262, -0.94370653, -1.13082173,\n","         -1.48111702]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_0_sigma</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2362 0.3797 ... 1.699 0.9418</div><input id='attrs-dfb8d86f-cc54-4319-acad-a933378ea63f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-dfb8d86f-cc54-4319-acad-a933378ea63f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d7684da4-71d7-45ac-bd39-f43b60217bf4' class='xr-var-data-in' type='checkbox'><label for='data-d7684da4-71d7-45ac-bd39-f43b60217bf4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.23618014, 0.37972086, 0.24349497, ..., 1.72961524, 1.37902291,\n","        0.22913491],\n","       [1.66235321, 1.87540579, 0.85411667, ..., 1.48952177, 1.2496651 ,\n","        1.82578841],\n","       [1.70469052, 1.36218848, 0.94389345, ..., 1.50192085, 1.66691466,\n","        1.78054575],\n","       [3.53042936, 1.40502862, 0.91951153, ..., 0.36552925, 1.69902723,\n","        0.94181614]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1_sigma</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.07582 0.1157 ... 0.02431 0.03258</div><input id='attrs-931eb51e-ff8e-4501-aaab-65bc5858a52a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-931eb51e-ff8e-4501-aaab-65bc5858a52a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f954fc38-0ceb-48a2-b336-e145e28ccee0' class='xr-var-data-in' type='checkbox'><label for='data-f954fc38-0ceb-48a2-b336-e145e28ccee0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.07582039, 0.11565623, 0.04363501, ..., 0.05948623, 0.07976362,\n","        0.072019  ],\n","       [0.00546445, 0.02437681, 0.03126958, ..., 0.05125624, 0.17779498,\n","        0.03780627],\n","       [0.0264912 , 0.03081576, 0.00677688, ..., 0.02640145, 0.03531216,\n","        0.02883838],\n","       [0.0290698 , 0.02919168, 0.01944159, ..., 0.03839478, 0.02431247,\n","        0.03257693]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>sigma_y</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>6.48 6.125 6.614 ... 6.591 6.67</div><input id='attrs-f73979fe-1a54-4195-a894-c44760680544' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f73979fe-1a54-4195-a894-c44760680544' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e000b8a4-a831-4420-b722-65e2a4a8ce7c' class='xr-var-data-in' type='checkbox'><label for='data-e000b8a4-a831-4420-b722-65e2a4a8ce7c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[6.48023282, 6.12496989, 6.61420151, ..., 6.04575604, 6.2896648 ,\n","        6.6028106 ],\n","       [7.25137038, 5.68163517, 6.96078851, ..., 6.827702  , 6.10442158,\n","        6.56944045],\n","       [6.33503777, 6.54274835, 6.58165844, ..., 6.40161022, 6.33252929,\n","        6.42106861],\n","       [6.10765071, 6.58902528, 6.02375927, ..., 6.69139227, 6.59065833,\n","        6.6699417 ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_0j</span></div><div class='xr-var-dims'>(chain, draw, site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>65.03 64.25 65.19 ... 63.08 63.32</div><input id='attrs-c49b0440-0472-4d68-8979-a725473a9489' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c49b0440-0472-4d68-8979-a725473a9489' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-97d26348-c93f-4fbc-bb2d-c18c120e6f21' class='xr-var-data-in' type='checkbox'><label for='data-97d26348-c93f-4fbc-bb2d-c18c120e6f21' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[65.03255695, 64.25194024, 65.18595728, 64.75139097,\n","         64.79789645],\n","        [62.3537837 , 62.85135168, 63.32656075, 62.46583888,\n","         62.52824622],\n","        [62.36573205, 61.94221782, 61.59151762, 62.07274573,\n","         62.1499227 ],\n","        ...,\n","        [63.45841873, 63.0150095 , 63.31298654, 60.26342626,\n","         61.22942756],\n","        [63.09821189, 65.72528353, 61.17034415, 61.80222254,\n","         62.31331773],\n","        [63.6980419 , 63.26067775, 63.40238522, 63.46455452,\n","         63.64186613]],\n","\n","       [[61.77108362, 63.25445242, 60.72767038, 60.49917175,\n","         58.7230969 ],\n","        [64.90225648, 69.26963996, 64.45019729, 63.46044166,\n","         65.05562166],\n","        [62.02984213, 59.58082616, 60.76749318, 60.91802006,\n","         59.79266439],\n","...\n","        [63.1776028 , 65.88377514, 60.498009  , 61.5912589 ,\n","         61.58667078],\n","        [64.15892177, 65.33160384, 63.88283117, 62.34193363,\n","         66.13548765],\n","        [63.75705298, 64.92852674, 63.40297085, 61.4500367 ,\n","         65.3159255 ]],\n","\n","       [[62.24974669, 68.67430437, 65.68719469, 64.42787215,\n","         67.51881268],\n","        [63.59157311, 66.27468943, 62.91247951, 63.2395979 ,\n","         65.07568441],\n","        [65.8478116 , 66.9151316 , 66.79068932, 65.14463206,\n","         66.20845429],\n","        ...,\n","        [65.08105465, 65.42732361, 65.13929488, 64.62271384,\n","         64.82773358],\n","        [63.61792155, 66.67192857, 63.4123751 , 61.77921706,\n","         63.31998923],\n","        [63.34138174, 64.59687739, 62.4032554 , 63.08303187,\n","         63.31753379]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1j</span></div><div class='xr-var-dims'>(chain, draw, site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.6367 -0.4785 ... -0.5797 -0.5911</div><input id='attrs-6dfdc89d-308a-4f63-89b8-80e7d5774001' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6dfdc89d-308a-4f63-89b8-80e7d5774001' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-59edbced-a0ea-4f67-8c07-11d7c87a7b08' class='xr-var-data-in' type='checkbox'><label for='data-59edbced-a0ea-4f67-8c07-11d7c87a7b08' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[-0.63674356, -0.4784809 , -0.61734429, -0.6250072 ,\n","         -0.63865456],\n","        [-0.5113992 , -0.38996384, -0.65096504, -0.5792559 ,\n","         -0.54346722],\n","        [-0.53146608, -0.48442843, -0.52636186, -0.57302655,\n","         -0.57276242],\n","        ...,\n","        [-0.56081323, -0.53724195, -0.51746553, -0.51249106,\n","         -0.54001088],\n","        [-0.55157746, -0.47824292, -0.51417357, -0.55795172,\n","         -0.56293066],\n","        [-0.56547557, -0.44340742, -0.60646561, -0.60400853,\n","         -0.61063051]],\n","\n","       [[-0.5158676 , -0.50703329, -0.5089466 , -0.50510726,\n","         -0.50891795],\n","        [-0.5850548 , -0.63570997, -0.64240445, -0.60211436,\n","         -0.65118685],\n","        [-0.50437202, -0.44982319, -0.47192027, -0.52176788,\n","         -0.49097286],\n","...\n","        [-0.54642645, -0.55189994, -0.52955122, -0.56700917,\n","         -0.56338808],\n","        [-0.58897669, -0.56583816, -0.64454948, -0.56144811,\n","         -0.65183455],\n","        [-0.57881829, -0.55708761, -0.61570828, -0.54277549,\n","         -0.62136039]],\n","\n","       [[-0.54704436, -0.5808856 , -0.61160519, -0.6206702 ,\n","         -0.67331929],\n","        [-0.58408453, -0.61961396, -0.66078568, -0.6090267 ,\n","         -0.62585084],\n","        [-0.64445062, -0.61321629, -0.65553001, -0.6520052 ,\n","         -0.66148136],\n","        ...,\n","        [-0.59887706, -0.50610201, -0.6068927 , -0.61052964,\n","         -0.62470589],\n","        [-0.5524533 , -0.51396507, -0.57702413, -0.56075837,\n","         -0.5852419 ],\n","        [-0.56320892, -0.50354723, -0.57355502, -0.57965066,\n","         -0.5910622 ]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>mu</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>45.93 45.93 45.29 ... 36.13 45.59</div><input id='attrs-fb00c509-b958-49a2-8399-5c9df9dc641f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-fb00c509-b958-49a2-8399-5c9df9dc641f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6878c544-859a-40da-b26c-bdf674f6ea65' class='xr-var-data-in' type='checkbox'><label for='data-6878c544-859a-40da-b26c-bdf674f6ea65' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[45.93025005, 45.93025005, 45.29350649, ..., 47.55422323,\n","         35.41978652, 45.63825954],\n","        [47.01180764, 47.01180764, 46.50040844, ..., 47.85463116,\n","         37.52875389, 46.22422948],\n","        [46.42174968, 46.42174968, 45.8902836 , ..., 46.68533737,\n","         35.8028514 , 44.96705011],\n","        ...,\n","        [46.63402178, 46.63402178, 46.07320855, ..., 46.64913378,\n","         36.38892704, 45.02910113],\n","        [46.55088798, 46.55088798, 45.99931052, ..., 47.11418992,\n","         36.41850739, 45.42539794],\n","        [46.73377483, 46.73377483, 46.16829926, ..., 47.1548424 ,\n","         35.55286275, 45.32295088]],\n","\n","       [[46.29505567, 46.29505567, 45.77918807, ..., 44.9823123 ,\n","         35.31287128, 43.45555845],\n","        [47.35061234, 47.35061234, 46.76555753, ..., 47.47357662,\n","         35.10102641, 45.52001606],\n","        [46.89868158, 46.89868158, 46.39430956, ..., 46.53639707,\n","         37.20791267, 45.06347848],\n","...\n","        [46.78480922, 46.78480922, 46.23838277, ..., 46.37519249,\n","         35.67081887, 44.68502823],\n","        [46.48962104, 46.48962104, 45.90064435, ..., 48.5359548 ,\n","         36.15109835, 46.58045115],\n","        [46.39250429, 46.39250429, 45.81368601, ..., 48.53919495,\n","         36.73334752, 46.67511378]],\n","\n","       [[45.83841581, 45.83841581, 45.29137145, ..., 49.33919183,\n","         36.5461253 , 47.31923396],\n","        [46.06903708, 46.06903708, 45.48495254, ..., 48.17771163,\n","         36.28654561, 46.3001591 ],\n","        [46.51429295, 46.51429295, 45.86984233, ..., 48.34845749,\n","         35.7803116 , 46.3640134 ],\n","        ...,\n","        [47.11474286, 47.11474286, 46.5158658 , ..., 47.96067444,\n","         36.09126245, 46.08655676],\n","        [47.04432252, 47.04432252, 46.49186922, ..., 47.51845798,\n","         36.39886192, 45.76273229],\n","        [46.44511411, 46.44511411, 45.88190519, ..., 47.35885429,\n","         36.12867241, 45.58566768]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-e9a12776-1328-4478-ac70-f3c35589470f' class='xr-section-summary-in' type='checkbox'  checked><label for='section-e9a12776-1328-4478-ac70-f3c35589470f' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:35:31.513352</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>184.01401925086975</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_log_likelihood6c49f06f-0633-4866-98dd-21d7c85335ae\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_log_likelihood6c49f06f-0633-4866-98dd-21d7c85335ae\" class = \"xr-section-summary\">log_likelihood</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:  (chain: 4, draw: 5000, obs_id: 415)\n","Coordinates:\n","  * chain    (chain) int64 0 1 2 3\n","  * draw     (draw) int64 0 1 2 3 4 5 6 7 ... 4993 4994 4995 4996 4997 4998 4999\n","  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 407 408 409 410 411 412 413 414\n","Data variables:\n","    y_est    (chain, draw, obs_id) float64 -2.801 -2.832 ... -3.112 -2.882\n","Attributes:\n","    created_at:                 2023-12-19T07:35:53.711666\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-e886a3ae-6fec-4e28-afbf-1a91bc6ecf52' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-e886a3ae-6fec-4e28-afbf-1a91bc6ecf52' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>obs_id</span>: 415</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-5746bae0-7b0b-42f1-ba44-c17908e4a914' class='xr-section-summary-in' type='checkbox'  checked><label for='section-5746bae0-7b0b-42f1-ba44-c17908e4a914' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-717e26b8-a9d4-4da7-b863-d4a8980b3cb8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-717e26b8-a9d4-4da7-b863-d4a8980b3cb8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4e4ff237-dcad-4f07-b46e-9daa840c9b3f' class='xr-var-data-in' type='checkbox'><label for='data-4e4ff237-dcad-4f07-b46e-9daa840c9b3f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-122e71fb-a1f4-4aac-baea-955fe1adf2ba' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-122e71fb-a1f4-4aac-baea-955fe1adf2ba' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8cf02feb-7e4c-4d1d-a518-b17594352794' class='xr-var-data-in' type='checkbox'><label for='data-8cf02feb-7e4c-4d1d-a518-b17594352794' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 410 411 412 413 414</div><input id='attrs-37df5bde-c093-4c1d-98d3-6beb97061399' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-37df5bde-c093-4c1d-98d3-6beb97061399' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-88d9421d-fe43-44b2-aec1-6ab20d8f6d23' class='xr-var-data-in' type='checkbox'><label for='data-88d9421d-fe43-44b2-aec1-6ab20d8f6d23' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 412, 413, 414])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-c51d6af6-39e1-4d3e-82e8-c676fa4e1d3f' class='xr-section-summary-in' type='checkbox'  checked><label for='section-c51d6af6-39e1-4d3e-82e8-c676fa4e1d3f' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>y_est</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-2.801 -2.832 ... -3.112 -2.882</div><input id='attrs-b932e10c-37ba-4ae5-9773-03394903966f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b932e10c-37ba-4ae5-9773-03394903966f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-23981f59-84a7-4797-80cb-e76fc2bae7c6' class='xr-var-data-in' type='checkbox'><label for='data-23981f59-84a7-4797-80cb-e76fc2bae7c6' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[-2.8013205 , -2.83205746, -2.8223685 , ..., -3.46716204,\n","         -3.02028515, -2.85410798],\n","        [-2.73131423, -2.85220966, -2.73463891, ..., -3.55358092,\n","         -3.29940962, -2.77334009],\n","        [-2.81197923, -2.8751883 , -2.82223232, ..., -3.31897047,\n","         -3.07179892, -2.91329221],\n","        ...,\n","        [-2.7201273 , -2.8132041 , -2.73004494, ..., -3.32307715,\n","         -3.11555374, -2.83903322],\n","        [-2.76039563, -2.84008909, -2.77050281, ..., -3.39753094,\n","         -3.12893212, -2.84162532],\n","        [-2.80724679, -2.89214519, -2.81436711, ..., -3.39353447,\n","         -3.04416254, -2.88862508]],\n","\n","       [[-2.90485441, -2.95021499, -2.91430088, ..., -3.13617232,\n","         -3.07700252, -3.09650612],\n","        [-2.65808165, -2.83006644, -2.65702893, ..., -3.52130547,\n","         -2.91667804, -2.75143991],\n","        [-2.85933723, -2.94593829, -2.86301707, ..., -3.30012102,\n","         -3.25692098, -2.94821685],\n","...\n","        [-2.77605308, -2.87010798, -2.78256535, ..., -3.27136987,\n","         -3.04166943, -2.90956414],\n","        [-2.76788615, -2.84192092, -2.77970752, ..., -3.67312753,\n","         -3.09547618, -2.78976385],\n","        [-2.78299859, -2.84793929, -2.79558999, ..., -3.66280194,\n","         -3.17715487, -2.79980999]],\n","\n","       [[-2.74656592, -2.77378187, -2.76761137, ..., -3.89754991,\n","         -3.140769  , -2.73469253],\n","        [-2.81432538, -2.85364592, -2.83077901, ..., -3.5745222 ,\n","         -3.12620738, -2.83762096],\n","        [-2.71790081, -2.80175977, -2.73225007, ..., -3.67503926,\n","         -3.0295316 , -2.75153035],\n","        ...,\n","        [-2.81990752, -2.92809865, -2.82237789, ..., -3.52744022,\n","         -3.10922012, -2.86064589],\n","        [-2.80461439, -2.91127441, -2.80756388, ..., -3.45527553,\n","         -3.14011057, -2.86220847],\n","        [-2.82001011, -2.88374268, -2.83059987, ..., -3.42516981,\n","         -3.11217104, -2.88206153]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-33655403-26b0-45d6-8d8d-d18dfd3c2851' class='xr-section-summary-in' type='checkbox'  checked><label for='section-33655403-26b0-45d6-8d8d-d18dfd3c2851' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:35:53.711666</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_sample_statse75adc13-8846-4067-adfc-f07bf85848b7\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_sample_statse75adc13-8846-4067-adfc-f07bf85848b7\" class = \"xr-section-summary\">sample_stats</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:                (chain: 4, draw: 5000)\n","Coordinates:\n","  * chain                  (chain) int64 0 1 2 3\n","  * draw                   (draw) int64 0 1 2 3 4 5 ... 4995 4996 4997 4998 4999\n","Data variables: (12/17)\n","    step_size_bar          (chain, draw) float64 0.03034 0.03034 ... 0.03189\n","    perf_counter_start     (chain, draw) float64 1.945e+03 ... 2.066e+03\n","    largest_eigval         (chain, draw) float64 nan nan nan nan ... nan nan nan\n","    lp                     (chain, draw) float64 -1.394e+03 ... -1.389e+03\n","    max_energy_error       (chain, draw) float64 0.1525 -0.07146 ... -0.07041\n","    diverging              (chain, draw) bool False False False ... False False\n","    ...                     ...\n","    energy                 (chain, draw) float64 1.4e+03 1.402e+03 ... 1.394e+03\n","    perf_counter_diff      (chain, draw) float64 0.0227 0.03295 ... 0.02608\n","    n_steps                (chain, draw) float64 127.0 127.0 ... 127.0 127.0\n","    process_time_diff      (chain, draw) float64 0.0227 0.02295 ... 0.02608\n","    step_size              (chain, draw) float64 0.02382 0.02382 ... 0.03392\n","    reached_max_treedepth  (chain, draw) bool False False False ... False False\n","Attributes:\n","    created_at:                 2023-12-19T07:35:31.551534\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0\n","    sampling_time:              184.01401925086975\n","    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-e4145f0f-4a4e-404d-a38e-dd194a9b5b3d' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-e4145f0f-4a4e-404d-a38e-dd194a9b5b3d' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-ceea72ff-bd09-4249-8cf2-fc9feae8029b' class='xr-section-summary-in' type='checkbox'  checked><label for='section-ceea72ff-bd09-4249-8cf2-fc9feae8029b' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-eed66d34-58d7-4e59-bbc4-7742a50e7168' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-eed66d34-58d7-4e59-bbc4-7742a50e7168' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e54cd7ae-ccf0-48de-b324-076f5cf1fb2d' class='xr-var-data-in' type='checkbox'><label for='data-e54cd7ae-ccf0-48de-b324-076f5cf1fb2d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-8aacf1e6-2845-4e6f-8df4-a2ad0cf7783e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8aacf1e6-2845-4e6f-8df4-a2ad0cf7783e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-796753bf-2179-47c9-a851-4aa201bce660' class='xr-var-data-in' type='checkbox'><label for='data-796753bf-2179-47c9-a851-4aa201bce660' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-919388e0-895a-4e96-8cbb-2eedc52d5a45' class='xr-section-summary-in' type='checkbox'  ><label for='section-919388e0-895a-4e96-8cbb-2eedc52d5a45' class='xr-section-summary' >Data variables: <span>(17)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>step_size_bar</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.03034 0.03034 ... 0.03189 0.03189</div><input id='attrs-9dcef986-7d0f-4adb-a4d0-fbfc4c791f67' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9dcef986-7d0f-4adb-a4d0-fbfc4c791f67' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-50f251a0-3574-4939-9209-d6481b202eef' class='xr-var-data-in' type='checkbox'><label for='data-50f251a0-3574-4939-9209-d6481b202eef' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.03033619, 0.03033619, 0.03033619, ..., 0.03033619, 0.03033619,\n","        0.03033619],\n","       [0.03158469, 0.03158469, 0.03158469, ..., 0.03158469, 0.03158469,\n","        0.03158469],\n","       [0.02845808, 0.02845808, 0.02845808, ..., 0.02845808, 0.02845808,\n","        0.02845808],\n","       [0.031887  , 0.031887  , 0.031887  , ..., 0.031887  , 0.031887  ,\n","        0.031887  ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_start</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.945e+03 1.945e+03 ... 2.066e+03</div><input id='attrs-39490d7b-fadf-4fc4-ba59-61442395edf8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-39490d7b-fadf-4fc4-ba59-61442395edf8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8715b7c9-412d-45ef-8248-b63b64fcab71' class='xr-var-data-in' type='checkbox'><label for='data-8715b7c9-412d-45ef-8248-b63b64fcab71' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1945.25006194, 1945.27294402, 1945.30608408, ..., 2075.44645656,\n","        2075.47061647, 2075.49387475],\n","       [1950.80987215, 1950.83323986, 1950.856481  , ..., 2084.66547344,\n","        2084.68869042, 2084.71195881],\n","       [1947.92808123, 1947.95196678, 1947.9757734 , ..., 2087.37667827,\n","        2087.4000702 , 2087.42345035],\n","       [1935.32141449, 1935.3443438 , 1935.36731417, ..., 2065.46356701,\n","        2065.48745723, 2065.52197246]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>largest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-1eeb1469-c5cd-43fe-bd28-d207093f2c5b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-1eeb1469-c5cd-43fe-bd28-d207093f2c5b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4b8cb9e6-41bb-4794-844b-f7a59304efed' class='xr-var-data-in' type='checkbox'><label for='data-4b8cb9e6-41bb-4794-844b-f7a59304efed' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lp</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-1.394e+03 ... -1.389e+03</div><input id='attrs-a61cce32-8d4e-4481-bc79-e3f6db85a8c9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a61cce32-8d4e-4481-bc79-e3f6db85a8c9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ce3f2ff2-584f-4369-ad89-194bdd629ff6' class='xr-var-data-in' type='checkbox'><label for='data-ce3f2ff2-584f-4369-ad89-194bdd629ff6' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-1394.09578801, -1393.33435529, -1392.53504047, ...,\n","        -1390.21064557, -1386.92949949, -1387.21272923],\n","       [-1399.97683392, -1394.9207998 , -1397.09060411, ...,\n","        -1390.49041788, -1386.9028515 , -1388.89585548],\n","       [-1387.08906732, -1392.49325571, -1393.74137146, ...,\n","        -1388.90782161, -1390.11897392, -1390.51976945],\n","       [-1394.23275918, -1392.11335259, -1392.82195564, ...,\n","        -1391.5686714 , -1390.89806642, -1389.48132896]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>max_energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.1525 -0.07146 ... -0.07041</div><input id='attrs-e1d73dbb-d0e0-4b07-ba70-1e2a8bd398f8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e1d73dbb-d0e0-4b07-ba70-1e2a8bd398f8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2fa34547-19b9-4707-b046-8ba9a387e653' class='xr-var-data-in' type='checkbox'><label for='data-2fa34547-19b9-4707-b046-8ba9a387e653' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.15246333, -0.07146223, -0.08379023, ..., -0.01163015,\n","         0.02992093,  0.02077947],\n","       [-0.00814342, -0.03100841,  0.07082105, ..., -0.09392171,\n","        -0.11576982, -0.09061514],\n","       [-0.03427166, -0.05982456,  0.11403019, ...,  0.05707786,\n","        -0.12245707, -0.02515492],\n","       [-0.04995813, -0.04900237, -0.06150227, ..., -0.05113856,\n","        -0.04084357, -0.07041496]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>diverging</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-f6de0b4a-a2b6-425d-bc96-29f3672d8688' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f6de0b4a-a2b6-425d-bc96-29f3672d8688' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-960cea30-f6eb-4d9c-9fd8-261b17768081' class='xr-var-data-in' type='checkbox'><label for='data-960cea30-f6eb-4d9c-9fd8-261b17768081' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>index_in_trajectory</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>60 60 100 32 -74 ... -46 76 21 33</div><input id='attrs-e59c66a2-af6a-42cf-bde0-057d43feea30' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e59c66a2-af6a-42cf-bde0-057d43feea30' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b7fca465-7d8e-4452-bdfa-789dcc999ef3' class='xr-var-data-in' type='checkbox'><label for='data-b7fca465-7d8e-4452-bdfa-789dcc999ef3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 60,  60, 100, ...,  20,  33, -77],\n","       [ 21,  79, 120, ..., -25,  89,  63],\n","       [-41, -24,  20, ..., -55, -89,  -8],\n","       [ -8, -49,  56, ...,  76,  21,  33]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>acceptance_rate</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.9487 0.9975 ... 0.9993 0.9991</div><input id='attrs-66af60df-3832-44d6-80e6-1114a4338c5e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-66af60df-3832-44d6-80e6-1114a4338c5e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b657cfd3-a913-439c-a5db-e642e1f9cbd1' class='xr-var-data-in' type='checkbox'><label for='data-b657cfd3-a913-439c-a5db-e642e1f9cbd1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.94866932, 0.99747208, 0.99972681, ..., 0.99922722, 0.98900661,\n","        0.98996467],\n","       [0.99808719, 0.99935415, 0.96840336, ..., 0.99745809, 0.99720023,\n","        0.99937885],\n","       [0.99926781, 0.99728498, 0.95626321, ..., 0.98640891, 0.99561257,\n","        0.99813154],\n","       [0.99984016, 0.99735128, 0.99905192, ..., 0.99999915, 0.99933529,\n","        0.99908344]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smallest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-6b4adfb9-08bd-4378-a42d-00fb43db0b48' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6b4adfb9-08bd-4378-a42d-00fb43db0b48' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-10f9476f-a736-4989-b65d-9f0574549f75' class='xr-var-data-in' type='checkbox'><label for='data-10f9476f-a736-4989-b65d-9f0574549f75' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.05653 0.01921 ... 0.0004732</div><input id='attrs-ee32ce7a-dccb-454f-b3fe-dd84c4ab6e8e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ee32ce7a-dccb-454f-b3fe-dd84c4ab6e8e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7ea55db3-bb24-4f41-a1f0-371e28306dc8' class='xr-var-data-in' type='checkbox'><label for='data-7ea55db3-bb24-4f41-a1f0-371e28306dc8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.05653358,  0.01921016, -0.02845229, ..., -0.00520115,\n","        -0.00088351,  0.00660129],\n","       [ 0.0010933 , -0.00765111,  0.05369772, ...,  0.00174273,\n","        -0.0668632 , -0.0186214 ],\n","       [-0.00045189,  0.00394934,  0.00030593, ...,  0.00612041,\n","        -0.05352808,  0.00125741],\n","       [ 0.00984883,  0.01382429,  0.00594255, ..., -0.01741391,\n","        -0.01694696,  0.00047322]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tree_depth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>7 7 7 7 7 7 7 7 ... 7 7 7 7 6 7 7 7</div><input id='attrs-bb5d7458-c2be-4ea4-8571-0b45aa35d8c4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bb5d7458-c2be-4ea4-8571-0b45aa35d8c4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d4adbb7d-6e3f-404c-adf5-71fcd28386bf' class='xr-var-data-in' type='checkbox'><label for='data-d4adbb7d-6e3f-404c-adf5-71fcd28386bf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[7, 7, 7, ..., 7, 7, 7],\n","       [7, 7, 7, ..., 7, 7, 7],\n","       [7, 7, 7, ..., 7, 7, 7],\n","       [7, 7, 7, ..., 7, 7, 7]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.4e+03 1.402e+03 ... 1.394e+03</div><input id='attrs-3c00419f-c6fa-4a04-8b67-5ed51550250a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3c00419f-c6fa-4a04-8b67-5ed51550250a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d3bb7d6a-9d0a-4fcb-8311-5e1c9dd75315' class='xr-var-data-in' type='checkbox'><label for='data-d3bb7d6a-9d0a-4fcb-8311-5e1c9dd75315' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1400.24991347, 1401.77151546, 1399.07451667, ..., 1399.95538992,\n","        1395.14216209, 1395.5939737 ],\n","       [1406.40632469, 1404.84230269, 1403.8678653 , ..., 1395.20209914,\n","        1396.38589347, 1392.54605357],\n","       [1393.50954799, 1398.19712192, 1403.79356614, ..., 1397.18128192,\n","        1397.11715732, 1398.40782817],\n","       [1398.29023152, 1399.91880859, 1396.93360399, ..., 1401.04917401,\n","        1398.23069476, 1393.91398075]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0227 0.03295 ... 0.03434 0.02608</div><input id='attrs-72fe4d90-83f4-4824-a8cf-412943364b39' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-72fe4d90-83f4-4824-a8cf-412943364b39' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-59369fe7-76f7-47d1-8c6c-744f1a35ae23' class='xr-var-data-in' type='checkbox'><label for='data-59369fe7-76f7-47d1-8c6c-744f1a35ae23' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.02270314, 0.03294724, 0.022726  , ..., 0.02398441, 0.02308738,\n","        0.02315927],\n","       [0.02318948, 0.02307032, 0.02302876, ..., 0.02304732, 0.02309998,\n","        0.02413353],\n","       [0.02370801, 0.02363846, 0.03280506, ..., 0.02320484, 0.0232124 ,\n","        0.023218  ],\n","       [0.02275257, 0.02279721, 0.03385873, ..., 0.02370923, 0.03434031,\n","        0.0260819 ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>n_steps</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>127.0 127.0 127.0 ... 127.0 127.0</div><input id='attrs-4a077c48-6645-43fe-ae8e-039061e721a6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4a077c48-6645-43fe-ae8e-039061e721a6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0f422cf8-da58-4802-ac7a-451dc4e9083a' class='xr-var-data-in' type='checkbox'><label for='data-0f422cf8-da58-4802-ac7a-451dc4e9083a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[127., 127., 127., ..., 127., 127., 127.],\n","       [127., 127., 127., ..., 127., 127., 127.],\n","       [127., 127., 127., ..., 127., 127., 127.],\n","       [127., 127., 127., ..., 127., 127., 127.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>process_time_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0227 0.02295 ... 0.02334 0.02608</div><input id='attrs-94efb859-4871-442b-8280-9ef76e3bc988' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-94efb859-4871-442b-8280-9ef76e3bc988' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-cb7ff617-e9fe-430e-a030-250b1e1e380c' class='xr-var-data-in' type='checkbox'><label for='data-cb7ff617-e9fe-430e-a030-250b1e1e380c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.02270307, 0.02295174, 0.02272625, ..., 0.02394016, 0.02308754,\n","        0.02315932],\n","       [0.02318973, 0.02307069, 0.02302932, ..., 0.02304765, 0.02309418,\n","        0.02413413],\n","       [0.02370798, 0.0236385 , 0.02380545, ..., 0.02320512, 0.02321227,\n","        0.02321837],\n","       [0.0227525 , 0.02279722, 0.02286257, ..., 0.02370952, 0.02334479,\n","        0.02608184]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.02382 0.02382 ... 0.03392 0.03392</div><input id='attrs-cbf3047b-d352-4522-87f9-d557249fe600' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-cbf3047b-d352-4522-87f9-d557249fe600' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ad1067c8-c505-4f5d-80d5-5779c36ee0a5' class='xr-var-data-in' type='checkbox'><label for='data-ad1067c8-c505-4f5d-80d5-5779c36ee0a5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.02382035, 0.02382035, 0.02382035, ..., 0.02382035, 0.02382035,\n","        0.02382035],\n","       [0.03579132, 0.03579132, 0.03579132, ..., 0.03579132, 0.03579132,\n","        0.03579132],\n","       [0.02571738, 0.02571738, 0.02571738, ..., 0.02571738, 0.02571738,\n","        0.02571738],\n","       [0.03391548, 0.03391548, 0.03391548, ..., 0.03391548, 0.03391548,\n","        0.03391548]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>reached_max_treedepth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-b2f8104e-142b-42c8-9ede-f8a47a1d1471' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b2f8104e-142b-42c8-9ede-f8a47a1d1471' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2b7bec22-8693-4c70-9ae5-15dc6d24dab2' class='xr-var-data-in' type='checkbox'><label for='data-2b7bec22-8693-4c70-9ae5-15dc6d24dab2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-63b80d72-824b-43ac-b6e5-fa1f391aebe8' class='xr-section-summary-in' type='checkbox'  checked><label for='section-63b80d72-824b-43ac-b6e5-fa1f391aebe8' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:35:31.551534</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>184.01401925086975</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_observed_data4839485d-30a5-41bb-8a70-20de8825b7c6\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_observed_data4839485d-30a5-41bb-8a70-20de8825b7c6\" class = \"xr-section-summary\">observed_data</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:  (obs_id: 415)\n","Coordinates:\n","  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 407 408 409 410 411 412 413 414\n","Data variables:\n","    y_est    (obs_id) float64 47.0 44.0 47.0 37.0 33.0 ... 32.0 40.0 31.0 48.0\n","Attributes:\n","    created_at:                 2023-12-19T07:35:31.558202\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-8eca61d5-95bc-42e8-a652-095bf0e4f914' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-8eca61d5-95bc-42e8-a652-095bf0e4f914' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 415</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-0ab71481-1168-4092-8fc9-010bbbcbe454' class='xr-section-summary-in' type='checkbox'  checked><label for='section-0ab71481-1168-4092-8fc9-010bbbcbe454' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 410 411 412 413 414</div><input id='attrs-2cef504d-31bf-4ef8-8d00-c491f42b74c0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2cef504d-31bf-4ef8-8d00-c491f42b74c0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d5f6ad12-1dd5-447d-9063-54fb43990fbb' class='xr-var-data-in' type='checkbox'><label for='data-d5f6ad12-1dd5-447d-9063-54fb43990fbb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 412, 413, 414])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-a9ed97df-6a6b-464f-8751-7634050ca9af' class='xr-section-summary-in' type='checkbox'  checked><label for='section-a9ed97df-6a6b-464f-8751-7634050ca9af' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>y_est</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>47.0 44.0 47.0 ... 40.0 31.0 48.0</div><input id='attrs-8bf06937-4845-4a2d-96ec-20d4bc1869d0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8bf06937-4845-4a2d-96ec-20d4bc1869d0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-49f40b5a-234a-42cf-8eb8-f7fcf1db2b34' class='xr-var-data-in' type='checkbox'><label for='data-49f40b5a-234a-42cf-8eb8-f7fcf1db2b34' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([47., 44., 47., 37., 33., 37., 37., 48., 38., 41., 35., 42., 33.,\n","       34., 49., 37., 36., 52., 36., 51., 45., 33., 37., 42., 51., 46.,\n","       36., 52., 48., 36., 52., 31., 50., 33., 40., 48., 21., 43., 28.,\n","       45., 45., 42., 42., 38., 44., 42., 37., 42., 33., 30., 60., 34.,\n","       44., 37., 19., 55., 39., 39., 42., 43., 41., 39., 42., 37., 55.,\n","       55., 46., 44., 44., 35., 41., 42., 49., 33., 38., 42., 26., 28.,\n","       59., 52., 35., 38., 31., 55., 31., 59., 41., 44., 47., 49., 41.,\n","       36., 44., 48., 42., 47., 39., 41., 52., 48., 38., 34., 24., 41.,\n","       49., 42., 53., 47., 40., 49., 35., 49., 52., 56., 57., 50., 55.,\n","       44., 37., 53., 38., 48., 43., 42., 36., 42., 42., 32., 31., 35.,\n","       45., 40., 49., 47., 40., 40., 46., 50., 43., 36., 35., 47., 50.,\n","       44., 34., 26., 42., 48., 41., 46., 43., 40., 52., 46., 41., 46.,\n","       40., 42., 41., 48., 49., 46., 35., 37., 45., 37., 36., 35., 45.,\n","       35., 40., 35., 49., 39., 38., 45., 40., 37., 36., 42., 32., 40.,\n","       45., 33., 45., 42., 40., 23., 32., 50., 44., 40., 36., 28., 51.,\n","       40., 33., 29., 37., 38., 38., 26., 40., 41., 43., 44., 38., 34.,\n","       46., 43., 42., 43., 40., 33., 44., 38., 40., 43., 31., 51., 50.,\n","       42., 41., 34., 38., 37., 42., 41., 27., 46., 33., 35., 48., 39.,\n","       41., 43., 31., 40., 38., 43., 38., 36., 41., 48., 44., 28., 36.,\n","       32., 42., 30., 40., 43., 36., 38., 25., 41., 35., 36., 45., 35.,\n","       36., 33., 42., 28., 43., 44., 38., 31., 33., 29., 43., 47., 42.,\n","       48., 27., 36., 31., 48., 34., 40., 32., 46., 34., 39., 36., 37.,\n","       39., 47., 44., 37., 40., 50., 35., 42., 24., 38., 41., 45., 35.,\n","       44., 46., 39., 52., 33., 35., 38., 39., 36., 42., 45., 37., 19.,\n","       27., 52., 49., 48., 28., 38., 53., 50., 41., 46., 42., 29., 20.,\n","       39., 32., 37., 37., 43., 32., 35., 44., 47., 32., 51., 37., 38.,\n","       36., 40., 58., 40., 39., 46., 27., 28., 42., 26., 56., 41., 55.,\n","       44., 30., 23., 40., 52., 44., 26., 49., 32., 36., 26., 40., 37.,\n","       34., 56., 33., 40., 51., 37., 38., 33., 45., 37., 32., 22., 31.,\n","       31., 44., 40., 34., 42., 28., 55., 26., 39., 36., 33., 34., 42.,\n","       44., 34., 35., 40., 43., 52., 21., 25., 39., 41., 42., 42., 55.,\n","       32., 38., 33., 48., 49., 30., 44., 36., 32., 40., 31., 48.])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-e10d5fb1-469b-4bc8-80d0-6c92c5e0dd3c' class='xr-section-summary-in' type='checkbox'  checked><label for='section-e10d5fb1-469b-4bc8-80d0-6c92c5e0dd3c' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:35:31.558202</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_constant_dataa9e67bd9-d1b3-4a76-80e7-469204d7401f\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_constant_dataa9e67bd9-d1b3-4a76-80e7-469204d7401f\" class = \"xr-section-summary\">constant_data</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:  (obs_id: 415)\n","Coordinates:\n","  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 407 408 409 410 411 412 413 414\n","Data variables:\n","    x        (obs_id) int32 30 30 31 47 50 42 37 33 ... 42 47 36 48 45 27 46 30\n","    site     (obs_id) int32 0 0 0 0 0 0 0 0 0 0 0 0 ... 4 4 4 4 4 4 4 4 4 4 4 4\n","Attributes:\n","    created_at:                 2023-12-19T07:35:31.559756\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-48f599dc-aef6-480e-9b97-6adb7dcdbaff' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-48f599dc-aef6-480e-9b97-6adb7dcdbaff' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 415</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-3f7c91cf-eba1-4b9a-9200-5068e5172fd5' class='xr-section-summary-in' type='checkbox'  checked><label for='section-3f7c91cf-eba1-4b9a-9200-5068e5172fd5' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 410 411 412 413 414</div><input id='attrs-0ea3dddb-7324-4dfd-9b5f-9d0d505089fa' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0ea3dddb-7324-4dfd-9b5f-9d0d505089fa' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-599aef44-f753-4934-a834-41bcca018727' class='xr-var-data-in' type='checkbox'><label for='data-599aef44-f753-4934-a834-41bcca018727' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 412, 413, 414])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-1c73d4fb-33e0-4c55-b381-fde2b6f3122c' class='xr-section-summary-in' type='checkbox'  checked><label for='section-1c73d4fb-33e0-4c55-b381-fde2b6f3122c' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>x</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>30 30 31 47 50 ... 48 45 27 46 30</div><input id='attrs-45eed9ea-e273-4a93-b415-80e127315591' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-45eed9ea-e273-4a93-b415-80e127315591' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e591fe8e-ba2a-44d8-a866-def67a5112a1' class='xr-var-data-in' type='checkbox'><label for='data-e591fe8e-ba2a-44d8-a866-def67a5112a1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([30, 30, 31, 47, 50, 42, 37, 33, 42, 40, 53, 34, 40, 40, 33, 42, 49,\n","       57, 44, 39, 39, 41, 42, 30, 39, 39, 43, 34, 27, 46, 43, 38, 29, 28,\n","       42, 38, 40, 27, 50, 28, 37, 32, 34, 42, 37, 36, 40, 36, 52, 46, 35,\n","       48, 48, 47, 47, 36, 39, 40, 40, 39, 49, 47, 40, 50, 37, 35, 45, 44,\n","       39, 47, 36, 34, 30, 41, 51, 43, 54, 43, 34, 35, 39, 36, 48, 32, 43,\n","       24, 33, 36, 39, 36, 38, 41, 37, 39, 37, 36, 41, 35, 39, 42, 44, 37,\n","       55, 37, 42, 39, 38, 34, 35, 39, 35, 34, 39, 31, 27, 34, 39, 36, 40,\n","       43, 45, 41, 47, 39, 45, 39, 39, 34, 42, 43, 37, 41, 42, 38, 43, 31,\n","       35, 45, 42, 41, 58, 47, 33, 40, 34, 45, 38, 31, 40, 37, 36, 37, 38,\n","       35, 34, 44, 44, 36, 36, 39, 40, 30, 47, 35, 48, 42, 42, 40, 35, 36,\n","       28, 47, 27, 49, 41, 37, 37, 41, 49, 54, 50, 36, 43, 35, 33, 40, 39,\n","       39, 46, 26, 49, 36, 42, 43, 33, 46, 46, 51, 43, 38, 44, 49, 26, 31,\n","       50, 47, 42, 46, 36, 40, 33, 33, 50, 43, 30, 36, 37, 30, 42, 39, 46,\n","       39, 28, 52, 26, 43, 38, 38, 46, 39, 44, 41, 44, 42, 30, 39, 45, 46,\n","       38, 36, 42, 39, 41, 37, 32, 49, 40, 42, 43, 48, 47, 35, 44, 35, 48,\n","       38, 45, 34, 30, 35, 45, 42, 32, 39, 38, 33, 35, 36, 36, 46, 43, 26,\n","       34, 37, 44, 41, 50, 22, 43, 41, 57, 43, 45, 39, 43, 41, 57, 35, 43,\n","       39, 38, 33, 55, 38, 46, 42, 48, 26, 40, 29, 36, 43, 32, 42, 42, 39,\n","       33, 39, 34, 35, 47, 53, 53, 33, 36, 37, 42, 33, 29, 40, 38, 48, 39,\n","       45, 52, 33, 37, 35, 46, 38, 48, 46, 32, 36, 53, 40, 44, 38, 35, 41,\n","       38, 45, 42, 28, 50, 53, 35, 60, 36, 52, 35, 48, 48, 32, 42, 39, 45,\n","       57, 39, 41, 45, 40, 46, 40, 50, 41, 41, 47, 31, 42, 42, 38, 42, 47,\n","       45, 54, 47, 53, 39, 52, 49, 41, 39, 24, 56, 41, 51, 35, 44, 39, 38,\n","       48, 45, 44, 45, 31, 43, 47, 55, 44, 36, 35, 36, 41, 39, 40, 39, 42,\n","       47, 36, 48, 45, 27, 46, 30], dtype=int32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>site</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>0 0 0 0 0 0 0 0 ... 4 4 4 4 4 4 4 4</div><input id='attrs-da92aa33-5dc7-439e-b274-38027951915c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-da92aa33-5dc7-439e-b274-38027951915c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1ccb6b59-62b4-4335-80f6-ea64d354048c' class='xr-var-data-in' type='checkbox'><label for='data-1ccb6b59-62b4-4335-80f6-ea64d354048c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n","       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n","       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n","       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n","       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,\n","       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2,\n","       2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,\n","       4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,\n","       4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,\n","       4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,\n","       4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,\n","       4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],\n","      dtype=int32)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-2b912be3-a81d-4e2e-b10a-9ee8825e7ea1' class='xr-section-summary-in' type='checkbox'  checked><label for='section-2b912be3-a81d-4e2e-b10a-9ee8825e7ea1' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:35:31.559756</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","              </ul>\n","            </div>\n","            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-sections.group-sections {\n","  grid-template-columns: auto;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt, dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n",".xr-wrap{width:700px!important;} </style>"],"text/plain":["Inference data with groups:\n","\t> posterior\n","\t> log_likelihood\n","\t> sample_stats\n","\t> observed_data\n","\t> constant_data"]},"execution_count":85,"metadata":{},"output_type":"execute_result"}],"source":["pm.compute_log_likelihood(complete_trace, model=complete_pooled_model)\n","pm.compute_log_likelihood(no_trace, model=no_pooled_model)\n","pm.compute_log_likelihood(var_inter_trace, model=var_inter_model)\n","pm.compute_log_likelihood(var_slope_trace, model=var_slope_model)\n","pm.compute_log_likelihood(var_both_trace, model=var_both_model)"]},{"cell_type":"code","execution_count":86,"metadata":{"collapsed":false,"id":"E1C8FB00292C4264A390F6F35C4582D7","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"fragment"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>rank</th>\n","      <th>elpd_loo</th>\n","      <th>p_loo</th>\n","      <th>elpd_diff</th>\n","      <th>weight</th>\n","      <th>se</th>\n","      <th>dse</th>\n","      <th>warning</th>\n","      <th>scale</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>model3(hierarchy both)</th>\n","      <td>0</td>\n","      <td>-1363.340492</td>\n","      <td>7.510265</td>\n","      <td>0.000000</td>\n","      <td>0.281716</td>\n","      <td>16.055330</td>\n","      <td>0.000000</td>\n","      <td>False</td>\n","      <td>log</td>\n","    </tr>\n","    <tr>\n","      <th>model1(hierarchical intercept)</th>\n","      <td>1</td>\n","      <td>-1363.949401</td>\n","      <td>6.770135</td>\n","      <td>0.608909</td>\n","      <td>0.000000</td>\n","      <td>16.021236</td>\n","      <td>0.891235</td>\n","      <td>False</td>\n","      <td>log</td>\n","    </tr>\n","    <tr>\n","      <th>model2(hierarchical slope)</th>\n","      <td>2</td>\n","      <td>-1364.190367</td>\n","      <td>7.281886</td>\n","      <td>0.849875</td>\n","      <td>0.000000</td>\n","      <td>15.976502</td>\n","      <td>0.397992</td>\n","      <td>False</td>\n","      <td>log</td>\n","    </tr>\n","    <tr>\n","      <th>no pool model</th>\n","      <td>3</td>\n","      <td>-1365.404604</td>\n","      <td>18.680394</td>\n","      <td>2.064112</td>\n","      <td>0.512647</td>\n","      <td>17.852656</td>\n","      <td>5.174477</td>\n","      <td>True</td>\n","      <td>log</td>\n","    </tr>\n","    <tr>\n","      <th>model0(complete pool)</th>\n","      <td>4</td>\n","      <td>-1367.847450</td>\n","      <td>3.117897</td>\n","      <td>4.506958</td>\n","      <td>0.205637</td>\n","      <td>15.951833</td>\n","      <td>3.339691</td>\n","      <td>False</td>\n","      <td>log</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                rank     elpd_loo      p_loo  elpd_diff  \\\n","model3(hierarchy both)             0 -1363.340492   7.510265   0.000000   \n","model1(hierarchical intercept)     1 -1363.949401   6.770135   0.608909   \n","model2(hierarchical slope)         2 -1364.190367   7.281886   0.849875   \n","no pool model                      3 -1365.404604  18.680394   2.064112   \n","model0(complete pool)              4 -1367.847450   3.117897   4.506958   \n","\n","                                  weight         se       dse  warning scale  \n","model3(hierarchy both)          0.281716  16.055330  0.000000    False   log  \n","model1(hierarchical intercept)  0.000000  16.021236  0.891235    False   log  \n","model2(hierarchical slope)      0.000000  15.976502  0.397992    False   log  \n","no pool model                   0.512647  17.852656  5.174477     True   log  \n","model0(complete pool)           0.205637  15.951833  3.339691    False   log  "]},"execution_count":86,"metadata":{},"output_type":"execute_result"}],"source":["comparison_list = {\n","    \"model0(complete pool)\":complete_trace,\n","    \"model1(hierarchical intercept)\":var_inter_trace,\n","    \"model2(hierarchical slope)\":var_slope_trace,\n","    \"model3(hierarchy both)\":var_both_trace,\n","    \"no pool model\":no_trace\n","}\n","az.compare(comparison_list)"]},{"cell_type":"markdown","metadata":{"id":"0D6E276D41B34EF68CA9CC5B48B80B7C","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["## 预测新站点的数据  \n","\n","* 我们可以根据当前的层级模型对新组别的数据进行预测，如\"Zurich\"站点  \n","\n","* 在pymc中，只要在`pm.sample_posterior_predictive`中传入模型MCMC后验参数采样结果，即可以在该模型的基础上对新数据生成预测  \n","\n","* 预测结果储存在`.predictions`中"]},{"cell_type":"code","execution_count":87,"metadata":{"collapsed":false,"id":"CEC6155E86BC49AD889AA8144AFD1C44","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[],"source":["# 选择站点为\"Zurich\"的数据\n","new_group = df_raw[df_raw.Site==\"Zurich\"]\n","# 生成被试索引\n","new_group[\"obs_id\"] = range(len(new_group))\n","# 生成站点索引\n","new_group[\"site_idx\"] = pd.factorize(new_group.Site)[0]"]},{"cell_type":"code","execution_count":88,"metadata":{"collapsed":false,"id":"93411C91A04C4833B7F425B0AF2466EA","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Sampling: [new_beta_0_offset, new_beta_1_offset]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"}],"source":["new_coords = {\"site\": new_group[\"Site\"].unique(),\n","          \"obs_id\": new_group.obs_id}\n","\n","with pm.Model(coords=new_coords) as hier_pred:\n","    #定义全局参数(这部分没有改变)\n","    beta_0 = pm.Normal(\"beta_0\", mu=40, sigma=20)\n","    beta_0_sigma = pm.Exponential(\"beta_0_sigma\", 1)\n","    beta_1 = pm.Normal(\"beta_1\", mu=0, sigma=5) \n","    beta_1_sigma = pm.Exponential(\"beta_1_sigma\", 1)\n","    sigma_y = pm.Exponential(\"sigma_y\", 1) \n","\n","    #传入自变量\n","    x = pm.MutableData(\"x\", new_group.stress, dims=\"obs_id\")\n","    #获得观测值对应的站点映射\n","    site = pm.MutableData(\"site\", new_group.site_idx, dims=\"obs_id\") \n","    \n","    #注意：在这里我们需要传入一个新的参数名，因为传入的是一个新站点(除此处外，其余的定义变量名未发生改变)\n","    new_beta_0_offset = pm.Normal(\"new_beta_0_offset\", 0, sigma=1, dims=\"site\")\n","    new_beta_0j = pm.Deterministic(\"new_beta_0j\", beta_0 + new_beta_0_offset * beta_0_sigma, dims=\"site\")\n","    new_beta_1_offset = pm.Normal(\"new_beta_1_offset\", 0, sigma=1, dims=\"site\")\n","    new_beta_1j = pm.Deterministic(\"new_beta_1j\", beta_1 + new_beta_1_offset * beta_1_sigma, dims=\"site\")\n","    new_mu = pm.Normal(\"new_mu\",  new_beta_0j[site]+new_beta_1j[site]*x, dims=\"obs_id\")\n","\n","    #似然\n","    likelihood = pm.Normal(\"y_est\", mu=new_mu, sigma=sigma_y, observed=new_group.scontrol, dims=\"obs_id\")\n","\n","    # 进行后验预测估计，注意使用的是上一个模型的后验参数估计，partial_trace\n","    pred_trace = pm.sample_posterior_predictive(var_both_trace,\n","                                                var_names=[\"new_beta_0j\",\"new_beta_1j\"],\n","                                                predictions=True,\n","                                                extend_inferencedata=True,\n","                                                random_seed=84735)"]},{"cell_type":"code","execution_count":89,"metadata":{"collapsed":false,"id":"D3BD9990093B430CB61519FD9C6E4E96","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["\n","            <div>\n","              <div class='xr-header'>\n","                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n","              </div>\n","              <ul class=\"xr-sections group-sections\">\n","              \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_posterior20c9a0b1-403b-40be-97e5-aa9e7d847802\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_posterior20c9a0b1-403b-40be-97e5-aa9e7d847802\" class = \"xr-section-summary\">posterior</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:        (chain: 4, draw: 5000, site: 5, obs_id: 415)\n","Coordinates:\n","  * chain          (chain) int64 0 1 2 3\n","  * draw           (draw) int64 0 1 2 3 4 5 6 ... 4994 4995 4996 4997 4998 4999\n","  * site           (site) &lt;U11 &#x27;Kassel&#x27; &#x27;Portugal&#x27; ... &#x27;Tsinghua&#x27; &#x27;UCSB&#x27;\n","  * obs_id         (obs_id) int64 0 1 2 3 4 5 6 ... 408 409 410 411 412 413 414\n","Data variables:\n","    beta_0         (chain, draw) float64 64.72 63.06 61.79 ... 65.06 64.73 63.83\n","    beta_1         (chain, draw) float64 -0.6279 -0.5358 ... -0.5393 -0.5428\n","    beta_0_offset  (chain, draw, site) float64 1.327 -1.979 ... -0.7901 -0.5411\n","    beta_1_offset  (chain, draw, site) float64 -0.1168 1.971 ... -1.131 -1.481\n","    beta_0_sigma   (chain, draw) float64 0.2362 0.3797 0.2435 ... 1.699 0.9418\n","    beta_1_sigma   (chain, draw) float64 0.07582 0.1157 ... 0.02431 0.03258\n","    sigma_y        (chain, draw) float64 6.48 6.125 6.614 ... 6.691 6.591 6.67\n","    beta_0j        (chain, draw, site) float64 65.03 64.25 65.19 ... 63.08 63.32\n","    beta_1j        (chain, draw, site) float64 -0.6367 -0.4785 ... -0.5911\n","    mu             (chain, draw, obs_id) float64 45.93 45.93 ... 36.13 45.59\n","Attributes:\n","    created_at:                 2023-12-19T07:35:31.513352\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0\n","    sampling_time:              184.01401925086975\n","    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-7dd72116-d16b-4aef-9197-2b1908de7f45' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-7dd72116-d16b-4aef-9197-2b1908de7f45' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>site</span>: 5</li><li><span class='xr-has-index'>obs_id</span>: 415</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-5fce0fc3-a4c0-46fa-a9d9-092875a2905d' class='xr-section-summary-in' type='checkbox'  checked><label for='section-5fce0fc3-a4c0-46fa-a9d9-092875a2905d' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-0736b8a5-1d6f-4920-9587-1906361d1671' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0736b8a5-1d6f-4920-9587-1906361d1671' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d034f956-5fcc-4ef2-b818-ff4df7695a43' class='xr-var-data-in' type='checkbox'><label for='data-d034f956-5fcc-4ef2-b818-ff4df7695a43' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-a5d7bd80-fb0e-4eed-a186-3bd3eed2845e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a5d7bd80-fb0e-4eed-a186-3bd3eed2845e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6cdeb88c-8fe7-4a51-b691-64c401195aa9' class='xr-var-data-in' type='checkbox'><label for='data-6cdeb88c-8fe7-4a51-b691-64c401195aa9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>site</span></div><div class='xr-var-dims'>(site)</div><div class='xr-var-dtype'>&lt;U11</div><div class='xr-var-preview xr-preview'>&#x27;Kassel&#x27; &#x27;Portugal&#x27; ... &#x27;UCSB&#x27;</div><input id='attrs-cf9dc561-f9a1-446f-ad91-ac0453ecf117' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-cf9dc561-f9a1-446f-ad91-ac0453ecf117' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e8fac76f-edad-4a09-bdcc-8787a6eebc56' class='xr-var-data-in' type='checkbox'><label for='data-e8fac76f-edad-4a09-bdcc-8787a6eebc56' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;Kassel&#x27;, &#x27;Portugal&#x27;, &#x27;Southampton&#x27;, &#x27;Tsinghua&#x27;, &#x27;UCSB&#x27;], dtype=&#x27;&lt;U11&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 410 411 412 413 414</div><input id='attrs-abba2781-c422-42b0-8e5f-561f2895d8e9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-abba2781-c422-42b0-8e5f-561f2895d8e9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-07e939d4-4865-4627-9342-e507c7198e06' class='xr-var-data-in' type='checkbox'><label for='data-07e939d4-4865-4627-9342-e507c7198e06' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 412, 413, 414])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-e031e204-f64c-4fe3-9624-c19cdc5a2250' class='xr-section-summary-in' type='checkbox'  checked><label for='section-e031e204-f64c-4fe3-9624-c19cdc5a2250' class='xr-section-summary' >Data variables: <span>(10)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>beta_0</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>64.72 63.06 61.79 ... 64.73 63.83</div><input id='attrs-68c69c40-2d4d-455d-9732-7b825c6b6474' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-68c69c40-2d4d-455d-9732-7b825c6b6474' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8f7d7e55-f465-4efa-9454-13ee281c2574' class='xr-var-data-in' type='checkbox'><label for='data-8f7d7e55-f465-4efa-9454-13ee281c2574' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[64.71922304, 63.0621471 , 61.79326145, ..., 63.10397497,\n","        62.44275561, 63.50120463],\n","       [61.90515858, 65.31912424, 60.71815171, ..., 63.95895558,\n","        61.06781421, 60.37778168],\n","       [62.38824464, 65.18970634, 63.89663111, ..., 62.59062737,\n","        64.03238532, 63.28582076],\n","       [65.88193751, 64.29277203, 66.05961826, ..., 65.06016127,\n","        64.72652915, 63.82714921]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.6279 -0.5358 ... -0.5393 -0.5428</div><input id='attrs-9d834b06-d287-4540-8106-9fbf5b4d6f4a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9d834b06-d287-4540-8106-9fbf5b4d6f4a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a315c9da-4da1-454b-95e3-02a9b9dc789a' class='xr-var-data-in' type='checkbox'><label for='data-a315c9da-4da1-454b-95e3-02a9b9dc789a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.6278873 , -0.5357842 , -0.53266063, ..., -0.4960945 ,\n","        -0.48906364, -0.5577741 ],\n","       [-0.50729126, -0.6290677 , -0.47705626, ..., -0.56917237,\n","        -0.60414197, -0.53104839],\n","       [-0.56075077, -0.62337504, -0.60231368, ..., -0.54372494,\n","        -0.63611068, -0.60990413],\n","       [-0.62292336, -0.62023602, -0.64455271, ..., -0.5636254 ,\n","        -0.53926594, -0.54281196]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_0_offset</span></div><div class='xr-var-dims'>(chain, draw, site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.327 -1.979 ... -0.7901 -0.5411</div><input id='attrs-2cf4d526-0710-4105-8d8d-a7049ec33331' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2cf4d526-0710-4105-8d8d-a7049ec33331' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4bad9a7d-e3fb-4b40-a938-669a4dcfe28c' class='xr-var-data-in' type='checkbox'><label for='data-4bad9a7d-e3fb-4b40-a938-669a4dcfe28c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[ 1.32667338, -1.97850166,  1.97617903,  0.13620081,\n","          0.33310764],\n","        [-1.86548456, -0.55513257,  0.69633692, -1.57038573,\n","         -1.40603514],\n","        [ 2.35105723,  0.61174314, -0.82853386,  1.14780313,\n","          1.46475823],\n","        ...,\n","        [ 0.20492637, -0.05143656,  0.12084281, -1.64230093,\n","         -1.08379446],\n","        [ 0.47530485,  2.38032878, -0.92269059, -0.46448327,\n","         -0.09386202],\n","        [ 0.85904532, -1.04971733, -0.43127172, -0.15994993,\n","          0.61388068]],\n","\n","       [[-0.08065371,  0.81167698, -0.70832612, -0.84578104,\n","         -1.91419108],\n","        [-0.22228136,  2.10648583, -0.46332743, -0.99108288,\n","         -0.1405043 ],\n","        [ 1.53572746, -1.33158103,  0.05776901,  0.23400592,\n","         -1.08356078],\n","...\n","        [ 0.39081649,  2.19262404, -1.39329471, -0.66539356,\n","         -0.6684484 ],\n","        [ 0.07591057,  0.77941513, -0.08971914, -1.01412012,\n","          1.26167366],\n","        [ 0.26465606,  0.92258567,  0.06579449, -1.03102325,\n","          1.14015871]],\n","\n","       [[-1.02882411,  0.79094257, -0.05516123, -0.41186644,\n","          0.46364762],\n","        [-0.49906379,  1.41058864, -0.98239459, -0.74957486,\n","          0.55722166],\n","        [-0.23034693,  0.93039978,  0.79506459, -0.99507855,\n","          0.16186423],\n","        ...,\n","        [ 0.05715928,  1.00446775,  0.21649051, -1.19675082,\n","         -0.63586618],\n","        [-0.65249549,  1.14500779, -0.77347439, -1.73470562,\n","         -0.82785013],\n","        [-0.51577739,  0.81728073, -1.51185964, -0.79008769,\n","         -0.54109863]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1_offset</span></div><div class='xr-var-dims'>(chain, draw, site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.1168 1.971 ... -1.131 -1.481</div><input id='attrs-cf2ad9df-34ad-4337-b509-7ea5ef9d57db' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-cf2ad9df-34ad-4337-b509-7ea5ef9d57db' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1692a0f7-03eb-4c1e-854e-c5d8096ad4f0' class='xr-var-data-in' type='checkbox'><label for='data-1692a0f7-03eb-4c1e-854e-c5d8096ad4f0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[-0.11680587,  1.97053053,  0.13905239,  0.03798578,\n","         -0.14201018],\n","        [ 0.21084032,  1.26080854, -0.99588967, -0.37586992,\n","         -0.06642985],\n","        [ 0.02737604,  1.10535547,  0.14435132, -0.92508084,\n","         -0.91902773],\n","        ...,\n","        [-1.08796166, -0.69171399, -0.35926015, -0.2756362 ,\n","         -0.73826136],\n","        [-0.78373857,  0.13565978, -0.31480432, -0.86365289,\n","         -0.92607408],\n","        [-0.10693659,  1.58800698, -0.67609246, -0.64197532,\n","         -0.73392303]],\n","\n","       [[-1.56947837,  0.04720917, -0.30292902,  0.39967377,\n","         -0.29768564],\n","        [ 1.8055232 , -0.27248334, -0.54710821,  1.10569589,\n","         -0.90738536],\n","        [-0.87355697,  0.87091266,  0.16424889, -1.42987601,\n","         -0.44505248],\n","...\n","        [-0.10232431, -0.30964215,  0.53685406, -0.88192987,\n","         -0.74477514],\n","        [ 1.33478048,  1.99003714, -0.23897733,  2.11435852,\n","         -0.44528213],\n","        [ 1.07793299,  1.83146648, -0.20126483,  2.32775372,\n","         -0.39725755]],\n","\n","       [[ 2.61023441,  1.4460974 ,  0.38934457,  0.07750867,\n","         -1.73361771],\n","        [ 1.23841748,  0.02130939, -1.38908298,  0.38399008,\n","         -0.1923434 ],\n","        [ 0.00525098,  1.61182346, -0.56462968, -0.38332726,\n","         -0.87074415],\n","        ...,\n","        [-0.91813684,  1.49820858, -1.1269059 , -1.2216306 ,\n","         -1.59085419],\n","        [-0.54241132,  1.04065432, -1.55303804, -0.88400839,\n","         -1.8910443 ],\n","        [-0.62611677,  1.20529262, -0.94370653, -1.13082173,\n","         -1.48111702]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_0_sigma</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2362 0.3797 ... 1.699 0.9418</div><input id='attrs-a3d4993b-c60d-47ad-814f-0b45375bb7fe' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a3d4993b-c60d-47ad-814f-0b45375bb7fe' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e3d25c93-a84e-4e04-8433-5944aa7d8eb3' class='xr-var-data-in' type='checkbox'><label for='data-e3d25c93-a84e-4e04-8433-5944aa7d8eb3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.23618014, 0.37972086, 0.24349497, ..., 1.72961524, 1.37902291,\n","        0.22913491],\n","       [1.66235321, 1.87540579, 0.85411667, ..., 1.48952177, 1.2496651 ,\n","        1.82578841],\n","       [1.70469052, 1.36218848, 0.94389345, ..., 1.50192085, 1.66691466,\n","        1.78054575],\n","       [3.53042936, 1.40502862, 0.91951153, ..., 0.36552925, 1.69902723,\n","        0.94181614]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1_sigma</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.07582 0.1157 ... 0.02431 0.03258</div><input id='attrs-e783539c-daa5-4714-9b09-4503bb165fc6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e783539c-daa5-4714-9b09-4503bb165fc6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fdf62586-4348-407e-9019-e8555e75e75e' class='xr-var-data-in' type='checkbox'><label for='data-fdf62586-4348-407e-9019-e8555e75e75e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.07582039, 0.11565623, 0.04363501, ..., 0.05948623, 0.07976362,\n","        0.072019  ],\n","       [0.00546445, 0.02437681, 0.03126958, ..., 0.05125624, 0.17779498,\n","        0.03780627],\n","       [0.0264912 , 0.03081576, 0.00677688, ..., 0.02640145, 0.03531216,\n","        0.02883838],\n","       [0.0290698 , 0.02919168, 0.01944159, ..., 0.03839478, 0.02431247,\n","        0.03257693]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>sigma_y</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>6.48 6.125 6.614 ... 6.591 6.67</div><input id='attrs-633674f7-3b6a-47cf-b810-090808ef35da' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-633674f7-3b6a-47cf-b810-090808ef35da' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2cf2f1fa-b16b-40de-b71d-409ce4669077' class='xr-var-data-in' type='checkbox'><label for='data-2cf2f1fa-b16b-40de-b71d-409ce4669077' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[6.48023282, 6.12496989, 6.61420151, ..., 6.04575604, 6.2896648 ,\n","        6.6028106 ],\n","       [7.25137038, 5.68163517, 6.96078851, ..., 6.827702  , 6.10442158,\n","        6.56944045],\n","       [6.33503777, 6.54274835, 6.58165844, ..., 6.40161022, 6.33252929,\n","        6.42106861],\n","       [6.10765071, 6.58902528, 6.02375927, ..., 6.69139227, 6.59065833,\n","        6.6699417 ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_0j</span></div><div class='xr-var-dims'>(chain, draw, site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>65.03 64.25 65.19 ... 63.08 63.32</div><input id='attrs-048a5a3d-c591-4fd9-a37a-0e55d18f7c96' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-048a5a3d-c591-4fd9-a37a-0e55d18f7c96' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5d773b07-7caf-4f23-abbf-740ab30595b6' class='xr-var-data-in' type='checkbox'><label for='data-5d773b07-7caf-4f23-abbf-740ab30595b6' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[65.03255695, 64.25194024, 65.18595728, 64.75139097,\n","         64.79789645],\n","        [62.3537837 , 62.85135168, 63.32656075, 62.46583888,\n","         62.52824622],\n","        [62.36573205, 61.94221782, 61.59151762, 62.07274573,\n","         62.1499227 ],\n","        ...,\n","        [63.45841873, 63.0150095 , 63.31298654, 60.26342626,\n","         61.22942756],\n","        [63.09821189, 65.72528353, 61.17034415, 61.80222254,\n","         62.31331773],\n","        [63.6980419 , 63.26067775, 63.40238522, 63.46455452,\n","         63.64186613]],\n","\n","       [[61.77108362, 63.25445242, 60.72767038, 60.49917175,\n","         58.7230969 ],\n","        [64.90225648, 69.26963996, 64.45019729, 63.46044166,\n","         65.05562166],\n","        [62.02984213, 59.58082616, 60.76749318, 60.91802006,\n","         59.79266439],\n","...\n","        [63.1776028 , 65.88377514, 60.498009  , 61.5912589 ,\n","         61.58667078],\n","        [64.15892177, 65.33160384, 63.88283117, 62.34193363,\n","         66.13548765],\n","        [63.75705298, 64.92852674, 63.40297085, 61.4500367 ,\n","         65.3159255 ]],\n","\n","       [[62.24974669, 68.67430437, 65.68719469, 64.42787215,\n","         67.51881268],\n","        [63.59157311, 66.27468943, 62.91247951, 63.2395979 ,\n","         65.07568441],\n","        [65.8478116 , 66.9151316 , 66.79068932, 65.14463206,\n","         66.20845429],\n","        ...,\n","        [65.08105465, 65.42732361, 65.13929488, 64.62271384,\n","         64.82773358],\n","        [63.61792155, 66.67192857, 63.4123751 , 61.77921706,\n","         63.31998923],\n","        [63.34138174, 64.59687739, 62.4032554 , 63.08303187,\n","         63.31753379]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1j</span></div><div class='xr-var-dims'>(chain, draw, site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.6367 -0.4785 ... -0.5797 -0.5911</div><input id='attrs-f7bdf72c-2199-4dbe-abc1-4997669b47df' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f7bdf72c-2199-4dbe-abc1-4997669b47df' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a47e6e22-239c-4b21-ac29-3f4ea9d40e6b' class='xr-var-data-in' type='checkbox'><label for='data-a47e6e22-239c-4b21-ac29-3f4ea9d40e6b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[-0.63674356, -0.4784809 , -0.61734429, -0.6250072 ,\n","         -0.63865456],\n","        [-0.5113992 , -0.38996384, -0.65096504, -0.5792559 ,\n","         -0.54346722],\n","        [-0.53146608, -0.48442843, -0.52636186, -0.57302655,\n","         -0.57276242],\n","        ...,\n","        [-0.56081323, -0.53724195, -0.51746553, -0.51249106,\n","         -0.54001088],\n","        [-0.55157746, -0.47824292, -0.51417357, -0.55795172,\n","         -0.56293066],\n","        [-0.56547557, -0.44340742, -0.60646561, -0.60400853,\n","         -0.61063051]],\n","\n","       [[-0.5158676 , -0.50703329, -0.5089466 , -0.50510726,\n","         -0.50891795],\n","        [-0.5850548 , -0.63570997, -0.64240445, -0.60211436,\n","         -0.65118685],\n","        [-0.50437202, -0.44982319, -0.47192027, -0.52176788,\n","         -0.49097286],\n","...\n","        [-0.54642645, -0.55189994, -0.52955122, -0.56700917,\n","         -0.56338808],\n","        [-0.58897669, -0.56583816, -0.64454948, -0.56144811,\n","         -0.65183455],\n","        [-0.57881829, -0.55708761, -0.61570828, -0.54277549,\n","         -0.62136039]],\n","\n","       [[-0.54704436, -0.5808856 , -0.61160519, -0.6206702 ,\n","         -0.67331929],\n","        [-0.58408453, -0.61961396, -0.66078568, -0.6090267 ,\n","         -0.62585084],\n","        [-0.64445062, -0.61321629, -0.65553001, -0.6520052 ,\n","         -0.66148136],\n","        ...,\n","        [-0.59887706, -0.50610201, -0.6068927 , -0.61052964,\n","         -0.62470589],\n","        [-0.5524533 , -0.51396507, -0.57702413, -0.56075837,\n","         -0.5852419 ],\n","        [-0.56320892, -0.50354723, -0.57355502, -0.57965066,\n","         -0.5910622 ]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>mu</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>45.93 45.93 45.29 ... 36.13 45.59</div><input id='attrs-930642a8-577e-47bf-8101-035e39b2fc43' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-930642a8-577e-47bf-8101-035e39b2fc43' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f03a9519-f31d-4e7c-a0c4-d5f880f34b0d' class='xr-var-data-in' type='checkbox'><label for='data-f03a9519-f31d-4e7c-a0c4-d5f880f34b0d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[45.93025005, 45.93025005, 45.29350649, ..., 47.55422323,\n","         35.41978652, 45.63825954],\n","        [47.01180764, 47.01180764, 46.50040844, ..., 47.85463116,\n","         37.52875389, 46.22422948],\n","        [46.42174968, 46.42174968, 45.8902836 , ..., 46.68533737,\n","         35.8028514 , 44.96705011],\n","        ...,\n","        [46.63402178, 46.63402178, 46.07320855, ..., 46.64913378,\n","         36.38892704, 45.02910113],\n","        [46.55088798, 46.55088798, 45.99931052, ..., 47.11418992,\n","         36.41850739, 45.42539794],\n","        [46.73377483, 46.73377483, 46.16829926, ..., 47.1548424 ,\n","         35.55286275, 45.32295088]],\n","\n","       [[46.29505567, 46.29505567, 45.77918807, ..., 44.9823123 ,\n","         35.31287128, 43.45555845],\n","        [47.35061234, 47.35061234, 46.76555753, ..., 47.47357662,\n","         35.10102641, 45.52001606],\n","        [46.89868158, 46.89868158, 46.39430956, ..., 46.53639707,\n","         37.20791267, 45.06347848],\n","...\n","        [46.78480922, 46.78480922, 46.23838277, ..., 46.37519249,\n","         35.67081887, 44.68502823],\n","        [46.48962104, 46.48962104, 45.90064435, ..., 48.5359548 ,\n","         36.15109835, 46.58045115],\n","        [46.39250429, 46.39250429, 45.81368601, ..., 48.53919495,\n","         36.73334752, 46.67511378]],\n","\n","       [[45.83841581, 45.83841581, 45.29137145, ..., 49.33919183,\n","         36.5461253 , 47.31923396],\n","        [46.06903708, 46.06903708, 45.48495254, ..., 48.17771163,\n","         36.28654561, 46.3001591 ],\n","        [46.51429295, 46.51429295, 45.86984233, ..., 48.34845749,\n","         35.7803116 , 46.3640134 ],\n","        ...,\n","        [47.11474286, 47.11474286, 46.5158658 , ..., 47.96067444,\n","         36.09126245, 46.08655676],\n","        [47.04432252, 47.04432252, 46.49186922, ..., 47.51845798,\n","         36.39886192, 45.76273229],\n","        [46.44511411, 46.44511411, 45.88190519, ..., 47.35885429,\n","         36.12867241, 45.58566768]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-a85de383-d25b-40a7-9e00-3b0a8ec0d9e3' class='xr-section-summary-in' type='checkbox'  checked><label for='section-a85de383-d25b-40a7-9e00-3b0a8ec0d9e3' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:35:31.513352</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>184.01401925086975</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_predictionsf9852b1b-3d81-4821-a027-512f09199787\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_predictionsf9852b1b-3d81-4821-a027-512f09199787\" class = \"xr-section-summary\">predictions</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:      (chain: 4, draw: 5000, site: 1)\n","Coordinates:\n","  * chain        (chain) int64 0 1 2 3\n","  * draw         (draw) int64 0 1 2 3 4 5 6 ... 4994 4995 4996 4997 4998 4999\n","  * site         (site) &lt;U6 &#x27;Zurich&#x27;\n","Data variables:\n","    new_beta_0j  (chain, draw, site) float64 64.32 63.31 61.69 ... 64.86 63.62\n","    new_beta_1j  (chain, draw, site) float64 -0.6747 -0.7658 ... -0.51 -0.5613\n","Attributes:\n","    created_at:                 2023-12-19T07:36:01.519354\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-b8968008-5768-4efa-a422-c4f0a21053ed' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-b8968008-5768-4efa-a422-c4f0a21053ed' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>site</span>: 1</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-279456d6-04f7-4e06-a454-740b95552c93' class='xr-section-summary-in' type='checkbox'  checked><label for='section-279456d6-04f7-4e06-a454-740b95552c93' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-afc505c8-ed66-4020-97fa-3f9de0413d35' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-afc505c8-ed66-4020-97fa-3f9de0413d35' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1fe10d0a-0b41-42b7-9091-79f2552a70c0' class='xr-var-data-in' type='checkbox'><label for='data-1fe10d0a-0b41-42b7-9091-79f2552a70c0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-762cc340-04b7-482c-a0fb-db2caedbc44e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-762cc340-04b7-482c-a0fb-db2caedbc44e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-85b0ef48-2d0f-4af0-a9ef-b16ab3423e69' class='xr-var-data-in' type='checkbox'><label for='data-85b0ef48-2d0f-4af0-a9ef-b16ab3423e69' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>site</span></div><div class='xr-var-dims'>(site)</div><div class='xr-var-dtype'>&lt;U6</div><div class='xr-var-preview xr-preview'>&#x27;Zurich&#x27;</div><input id='attrs-38c41909-cfe6-40e2-896f-99b11fae3d11' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-38c41909-cfe6-40e2-896f-99b11fae3d11' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-184f6f19-c638-4b0a-ba1f-434ac8ec406d' class='xr-var-data-in' type='checkbox'><label for='data-184f6f19-c638-4b0a-ba1f-434ac8ec406d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;Zurich&#x27;], dtype=&#x27;&lt;U6&#x27;)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-038ec400-a0c1-49b8-9181-0d676890bac8' class='xr-section-summary-in' type='checkbox'  checked><label for='section-038ec400-a0c1-49b8-9181-0d676890bac8' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>new_beta_0j</span></div><div class='xr-var-dims'>(chain, draw, site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>64.32 63.31 61.69 ... 64.86 63.62</div><input id='attrs-4f02c890-d246-4a08-81b6-455e5e813cbe' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4f02c890-d246-4a08-81b6-455e5e813cbe' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9f342a8f-ed87-4858-b607-8d767e0d3237' class='xr-var-data-in' type='checkbox'><label for='data-9f342a8f-ed87-4858-b607-8d767e0d3237' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[64.32045753],\n","        [63.30795684],\n","        [61.68964038],\n","        ...,\n","        [61.02058582],\n","        [63.0964226 ],\n","        [63.61866049]],\n","\n","       [[64.05306636],\n","        [62.98349044],\n","        [60.48392876],\n","        ...,\n","        [62.7044932 ],\n","        [59.23272017],\n","        [62.44267776]],\n","\n","       [[61.71474864],\n","        [64.48667857],\n","        [64.68626231],\n","        ...,\n","        [60.6001173 ],\n","        [66.2088984 ],\n","        [61.86300786]],\n","\n","       [[67.21357403],\n","        [61.54918441],\n","        [66.97391537],\n","        ...,\n","        [65.19420529],\n","        [64.85573083],\n","        [63.6157319 ]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>new_beta_1j</span></div><div class='xr-var-dims'>(chain, draw, site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.6747 -0.7658 ... -0.51 -0.5613</div><input id='attrs-74259827-3090-4cc8-825e-721bcda11f15' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-74259827-3090-4cc8-825e-721bcda11f15' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3faa0705-89b5-46a4-873c-6c7486e367c7' class='xr-var-data-in' type='checkbox'><label for='data-3faa0705-89b5-46a4-873c-6c7486e367c7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[-0.67472299],\n","        [-0.76576183],\n","        [-0.4877542 ],\n","        ...,\n","        [-0.52545893],\n","        [-0.40293951],\n","        [-0.58532709]],\n","\n","       [[-0.50961309],\n","        [-0.61245241],\n","        [-0.51006996],\n","        ...,\n","        [-0.55056342],\n","        [-0.90539897],\n","        [-0.56644154]],\n","\n","       [[-0.53136291],\n","        [-0.60191782],\n","        [-0.60679271],\n","        ...,\n","        [-0.52497934],\n","        [-0.63781649],\n","        [-0.61612941]],\n","\n","       [[-0.59835132],\n","        [-0.61654104],\n","        [-0.66074668],\n","        ...,\n","        [-0.56855324],\n","        [-0.51003184],\n","        [-0.56126546]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-5a66b089-e008-4935-914c-d6ec12b6b573' class='xr-section-summary-in' type='checkbox'  checked><label for='section-5a66b089-e008-4935-914c-d6ec12b6b573' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:36:01.519354</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_log_likelihood385cfbf5-4b27-4a4d-b6a8-92831ce67cb4\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_log_likelihood385cfbf5-4b27-4a4d-b6a8-92831ce67cb4\" class = \"xr-section-summary\">log_likelihood</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:  (chain: 4, draw: 5000, obs_id: 415)\n","Coordinates:\n","  * chain    (chain) int64 0 1 2 3\n","  * draw     (draw) int64 0 1 2 3 4 5 6 7 ... 4993 4994 4995 4996 4997 4998 4999\n","  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 407 408 409 410 411 412 413 414\n","Data variables:\n","    y_est    (chain, draw, obs_id) float64 -2.801 -2.832 ... -3.112 -2.882\n","Attributes:\n","    created_at:                 2023-12-19T07:35:53.711666\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-db2c74e7-de0d-44b5-976c-1a2f9059590d' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-db2c74e7-de0d-44b5-976c-1a2f9059590d' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>obs_id</span>: 415</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-131764c0-920d-4317-81f0-c9a517d9ce3a' class='xr-section-summary-in' type='checkbox'  checked><label for='section-131764c0-920d-4317-81f0-c9a517d9ce3a' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-585609e9-b178-45f4-a56e-fa0a7f5db703' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-585609e9-b178-45f4-a56e-fa0a7f5db703' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-844536e3-7a39-44ba-a454-8ce63640c930' class='xr-var-data-in' type='checkbox'><label for='data-844536e3-7a39-44ba-a454-8ce63640c930' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-101216a3-fc20-40b7-b818-5a190591dbda' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-101216a3-fc20-40b7-b818-5a190591dbda' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a98731e1-036b-4b3e-ab1a-a44465fd728c' class='xr-var-data-in' type='checkbox'><label for='data-a98731e1-036b-4b3e-ab1a-a44465fd728c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 410 411 412 413 414</div><input id='attrs-611c003a-1ea7-482b-955d-613c567e80bc' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-611c003a-1ea7-482b-955d-613c567e80bc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-782fb233-ca37-42d1-936b-367eadaed3a3' class='xr-var-data-in' type='checkbox'><label for='data-782fb233-ca37-42d1-936b-367eadaed3a3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 412, 413, 414])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-9449c294-46e3-48b9-8fdf-0bc04da28ba7' class='xr-section-summary-in' type='checkbox'  checked><label for='section-9449c294-46e3-48b9-8fdf-0bc04da28ba7' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>y_est</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-2.801 -2.832 ... -3.112 -2.882</div><input id='attrs-51dceec8-9a77-4105-b943-eff7385e23e8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-51dceec8-9a77-4105-b943-eff7385e23e8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3542be56-73df-4086-8d24-2be285fc2035' class='xr-var-data-in' type='checkbox'><label for='data-3542be56-73df-4086-8d24-2be285fc2035' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[-2.8013205 , -2.83205746, -2.8223685 , ..., -3.46716204,\n","         -3.02028515, -2.85410798],\n","        [-2.73131423, -2.85220966, -2.73463891, ..., -3.55358092,\n","         -3.29940962, -2.77334009],\n","        [-2.81197923, -2.8751883 , -2.82223232, ..., -3.31897047,\n","         -3.07179892, -2.91329221],\n","        ...,\n","        [-2.7201273 , -2.8132041 , -2.73004494, ..., -3.32307715,\n","         -3.11555374, -2.83903322],\n","        [-2.76039563, -2.84008909, -2.77050281, ..., -3.39753094,\n","         -3.12893212, -2.84162532],\n","        [-2.80724679, -2.89214519, -2.81436711, ..., -3.39353447,\n","         -3.04416254, -2.88862508]],\n","\n","       [[-2.90485441, -2.95021499, -2.91430088, ..., -3.13617232,\n","         -3.07700252, -3.09650612],\n","        [-2.65808165, -2.83006644, -2.65702893, ..., -3.52130547,\n","         -2.91667804, -2.75143991],\n","        [-2.85933723, -2.94593829, -2.86301707, ..., -3.30012102,\n","         -3.25692098, -2.94821685],\n","...\n","        [-2.77605308, -2.87010798, -2.78256535, ..., -3.27136987,\n","         -3.04166943, -2.90956414],\n","        [-2.76788615, -2.84192092, -2.77970752, ..., -3.67312753,\n","         -3.09547618, -2.78976385],\n","        [-2.78299859, -2.84793929, -2.79558999, ..., -3.66280194,\n","         -3.17715487, -2.79980999]],\n","\n","       [[-2.74656592, -2.77378187, -2.76761137, ..., -3.89754991,\n","         -3.140769  , -2.73469253],\n","        [-2.81432538, -2.85364592, -2.83077901, ..., -3.5745222 ,\n","         -3.12620738, -2.83762096],\n","        [-2.71790081, -2.80175977, -2.73225007, ..., -3.67503926,\n","         -3.0295316 , -2.75153035],\n","        ...,\n","        [-2.81990752, -2.92809865, -2.82237789, ..., -3.52744022,\n","         -3.10922012, -2.86064589],\n","        [-2.80461439, -2.91127441, -2.80756388, ..., -3.45527553,\n","         -3.14011057, -2.86220847],\n","        [-2.82001011, -2.88374268, -2.83059987, ..., -3.42516981,\n","         -3.11217104, -2.88206153]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-32511eb2-d8a6-4cc4-a1f2-a4759d107477' class='xr-section-summary-in' type='checkbox'  checked><label for='section-32511eb2-d8a6-4cc4-a1f2-a4759d107477' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:35:53.711666</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_sample_stats18e3fda4-9826-4ca1-8740-868f5f7bce87\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_sample_stats18e3fda4-9826-4ca1-8740-868f5f7bce87\" class = \"xr-section-summary\">sample_stats</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:                (chain: 4, draw: 5000)\n","Coordinates:\n","  * chain                  (chain) int64 0 1 2 3\n","  * draw                   (draw) int64 0 1 2 3 4 5 ... 4995 4996 4997 4998 4999\n","Data variables: (12/17)\n","    step_size_bar          (chain, draw) float64 0.03034 0.03034 ... 0.03189\n","    perf_counter_start     (chain, draw) float64 1.945e+03 ... 2.066e+03\n","    largest_eigval         (chain, draw) float64 nan nan nan nan ... nan nan nan\n","    lp                     (chain, draw) float64 -1.394e+03 ... -1.389e+03\n","    max_energy_error       (chain, draw) float64 0.1525 -0.07146 ... -0.07041\n","    diverging              (chain, draw) bool False False False ... False False\n","    ...                     ...\n","    energy                 (chain, draw) float64 1.4e+03 1.402e+03 ... 1.394e+03\n","    perf_counter_diff      (chain, draw) float64 0.0227 0.03295 ... 0.02608\n","    n_steps                (chain, draw) float64 127.0 127.0 ... 127.0 127.0\n","    process_time_diff      (chain, draw) float64 0.0227 0.02295 ... 0.02608\n","    step_size              (chain, draw) float64 0.02382 0.02382 ... 0.03392\n","    reached_max_treedepth  (chain, draw) bool False False False ... False False\n","Attributes:\n","    created_at:                 2023-12-19T07:35:31.551534\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0\n","    sampling_time:              184.01401925086975\n","    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-e0c2a229-6420-49b9-9cc8-6c87eb406aba' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-e0c2a229-6420-49b9-9cc8-6c87eb406aba' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-9cc09912-03b3-4acd-a060-619ad6d16a51' class='xr-section-summary-in' type='checkbox'  checked><label for='section-9cc09912-03b3-4acd-a060-619ad6d16a51' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-2558b04e-f928-4ee1-92e9-7877a392a02d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2558b04e-f928-4ee1-92e9-7877a392a02d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-880beb5b-a4d7-4be0-ae37-25f8c63affd2' class='xr-var-data-in' type='checkbox'><label for='data-880beb5b-a4d7-4be0-ae37-25f8c63affd2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-c41bbd55-82d8-4e54-a895-4314c2d08691' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c41bbd55-82d8-4e54-a895-4314c2d08691' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8deecd90-1419-4384-8ab5-4f3785c32a7b' class='xr-var-data-in' type='checkbox'><label for='data-8deecd90-1419-4384-8ab5-4f3785c32a7b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-5b9c0e7a-797b-4e76-a504-559cb4d982d7' class='xr-section-summary-in' type='checkbox'  ><label for='section-5b9c0e7a-797b-4e76-a504-559cb4d982d7' class='xr-section-summary' >Data variables: <span>(17)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>step_size_bar</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.03034 0.03034 ... 0.03189 0.03189</div><input id='attrs-027c6e1f-91b5-42b0-8ea4-844a63510ca1' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-027c6e1f-91b5-42b0-8ea4-844a63510ca1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8b1b8119-fa3a-4022-a598-d3a07e6d2a2d' class='xr-var-data-in' type='checkbox'><label for='data-8b1b8119-fa3a-4022-a598-d3a07e6d2a2d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.03033619, 0.03033619, 0.03033619, ..., 0.03033619, 0.03033619,\n","        0.03033619],\n","       [0.03158469, 0.03158469, 0.03158469, ..., 0.03158469, 0.03158469,\n","        0.03158469],\n","       [0.02845808, 0.02845808, 0.02845808, ..., 0.02845808, 0.02845808,\n","        0.02845808],\n","       [0.031887  , 0.031887  , 0.031887  , ..., 0.031887  , 0.031887  ,\n","        0.031887  ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_start</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.945e+03 1.945e+03 ... 2.066e+03</div><input id='attrs-8ce7a290-67a2-4ef8-a2df-55e3b41b9a77' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8ce7a290-67a2-4ef8-a2df-55e3b41b9a77' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-189a3028-0245-4865-9b0f-99fe5b698066' class='xr-var-data-in' type='checkbox'><label for='data-189a3028-0245-4865-9b0f-99fe5b698066' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1945.25006194, 1945.27294402, 1945.30608408, ..., 2075.44645656,\n","        2075.47061647, 2075.49387475],\n","       [1950.80987215, 1950.83323986, 1950.856481  , ..., 2084.66547344,\n","        2084.68869042, 2084.71195881],\n","       [1947.92808123, 1947.95196678, 1947.9757734 , ..., 2087.37667827,\n","        2087.4000702 , 2087.42345035],\n","       [1935.32141449, 1935.3443438 , 1935.36731417, ..., 2065.46356701,\n","        2065.48745723, 2065.52197246]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>largest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-dfed59c6-4886-4bfb-b79c-6d1b7423ada7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-dfed59c6-4886-4bfb-b79c-6d1b7423ada7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d97ca353-7f91-464c-a535-1791328ec500' class='xr-var-data-in' type='checkbox'><label for='data-d97ca353-7f91-464c-a535-1791328ec500' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lp</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-1.394e+03 ... -1.389e+03</div><input id='attrs-4f3c3b1f-676e-49de-819b-2721258b02d4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4f3c3b1f-676e-49de-819b-2721258b02d4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b290c0b3-ee5d-4bb2-aa83-a3fbefbfa4f4' class='xr-var-data-in' type='checkbox'><label for='data-b290c0b3-ee5d-4bb2-aa83-a3fbefbfa4f4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-1394.09578801, -1393.33435529, -1392.53504047, ...,\n","        -1390.21064557, -1386.92949949, -1387.21272923],\n","       [-1399.97683392, -1394.9207998 , -1397.09060411, ...,\n","        -1390.49041788, -1386.9028515 , -1388.89585548],\n","       [-1387.08906732, -1392.49325571, -1393.74137146, ...,\n","        -1388.90782161, -1390.11897392, -1390.51976945],\n","       [-1394.23275918, -1392.11335259, -1392.82195564, ...,\n","        -1391.5686714 , -1390.89806642, -1389.48132896]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>max_energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.1525 -0.07146 ... -0.07041</div><input id='attrs-92a216ae-af18-4e1b-8f19-24e01cf20369' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-92a216ae-af18-4e1b-8f19-24e01cf20369' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0137780c-03e5-43c6-b1f7-708d716070c6' class='xr-var-data-in' type='checkbox'><label for='data-0137780c-03e5-43c6-b1f7-708d716070c6' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.15246333, -0.07146223, -0.08379023, ..., -0.01163015,\n","         0.02992093,  0.02077947],\n","       [-0.00814342, -0.03100841,  0.07082105, ..., -0.09392171,\n","        -0.11576982, -0.09061514],\n","       [-0.03427166, -0.05982456,  0.11403019, ...,  0.05707786,\n","        -0.12245707, -0.02515492],\n","       [-0.04995813, -0.04900237, -0.06150227, ..., -0.05113856,\n","        -0.04084357, -0.07041496]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>diverging</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-a34bbd62-e7e7-40da-8895-5619748946eb' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a34bbd62-e7e7-40da-8895-5619748946eb' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f86677d0-dccf-4ea5-97c3-662eddf4476d' class='xr-var-data-in' type='checkbox'><label for='data-f86677d0-dccf-4ea5-97c3-662eddf4476d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>index_in_trajectory</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>60 60 100 32 -74 ... -46 76 21 33</div><input id='attrs-ac31606a-2a73-4366-a67a-4f7a06a65dcc' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ac31606a-2a73-4366-a67a-4f7a06a65dcc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c723725e-8be5-4d1e-862f-415101f1c505' class='xr-var-data-in' type='checkbox'><label for='data-c723725e-8be5-4d1e-862f-415101f1c505' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 60,  60, 100, ...,  20,  33, -77],\n","       [ 21,  79, 120, ..., -25,  89,  63],\n","       [-41, -24,  20, ..., -55, -89,  -8],\n","       [ -8, -49,  56, ...,  76,  21,  33]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>acceptance_rate</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.9487 0.9975 ... 0.9993 0.9991</div><input id='attrs-a070aef2-35d3-40aa-ae7d-d44b9bafbd2e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a070aef2-35d3-40aa-ae7d-d44b9bafbd2e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7098faa4-2007-40f6-81b0-fa4886f562ee' class='xr-var-data-in' type='checkbox'><label for='data-7098faa4-2007-40f6-81b0-fa4886f562ee' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.94866932, 0.99747208, 0.99972681, ..., 0.99922722, 0.98900661,\n","        0.98996467],\n","       [0.99808719, 0.99935415, 0.96840336, ..., 0.99745809, 0.99720023,\n","        0.99937885],\n","       [0.99926781, 0.99728498, 0.95626321, ..., 0.98640891, 0.99561257,\n","        0.99813154],\n","       [0.99984016, 0.99735128, 0.99905192, ..., 0.99999915, 0.99933529,\n","        0.99908344]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smallest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-d4be5855-248c-4b9a-92b0-0fed8305a3c6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d4be5855-248c-4b9a-92b0-0fed8305a3c6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-447cc2de-f519-4c4d-9b32-6281e134fbad' class='xr-var-data-in' type='checkbox'><label for='data-447cc2de-f519-4c4d-9b32-6281e134fbad' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.05653 0.01921 ... 0.0004732</div><input id='attrs-6eab7d9b-7072-4335-be3b-0673ffe18377' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6eab7d9b-7072-4335-be3b-0673ffe18377' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3aa67529-f156-4682-a74b-f488d875c77f' class='xr-var-data-in' type='checkbox'><label for='data-3aa67529-f156-4682-a74b-f488d875c77f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.05653358,  0.01921016, -0.02845229, ..., -0.00520115,\n","        -0.00088351,  0.00660129],\n","       [ 0.0010933 , -0.00765111,  0.05369772, ...,  0.00174273,\n","        -0.0668632 , -0.0186214 ],\n","       [-0.00045189,  0.00394934,  0.00030593, ...,  0.00612041,\n","        -0.05352808,  0.00125741],\n","       [ 0.00984883,  0.01382429,  0.00594255, ..., -0.01741391,\n","        -0.01694696,  0.00047322]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tree_depth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>7 7 7 7 7 7 7 7 ... 7 7 7 7 6 7 7 7</div><input id='attrs-3fd25a55-8b19-470e-982d-6c7edb23d59b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3fd25a55-8b19-470e-982d-6c7edb23d59b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ff401925-5d66-4141-a58d-980dbe60e300' class='xr-var-data-in' type='checkbox'><label for='data-ff401925-5d66-4141-a58d-980dbe60e300' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[7, 7, 7, ..., 7, 7, 7],\n","       [7, 7, 7, ..., 7, 7, 7],\n","       [7, 7, 7, ..., 7, 7, 7],\n","       [7, 7, 7, ..., 7, 7, 7]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.4e+03 1.402e+03 ... 1.394e+03</div><input id='attrs-31c7eba9-bbe9-451c-8046-81794293ce9e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-31c7eba9-bbe9-451c-8046-81794293ce9e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c0b8d041-e552-41ad-bef5-77e1e8e9ca9f' class='xr-var-data-in' type='checkbox'><label for='data-c0b8d041-e552-41ad-bef5-77e1e8e9ca9f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1400.24991347, 1401.77151546, 1399.07451667, ..., 1399.95538992,\n","        1395.14216209, 1395.5939737 ],\n","       [1406.40632469, 1404.84230269, 1403.8678653 , ..., 1395.20209914,\n","        1396.38589347, 1392.54605357],\n","       [1393.50954799, 1398.19712192, 1403.79356614, ..., 1397.18128192,\n","        1397.11715732, 1398.40782817],\n","       [1398.29023152, 1399.91880859, 1396.93360399, ..., 1401.04917401,\n","        1398.23069476, 1393.91398075]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0227 0.03295 ... 0.03434 0.02608</div><input id='attrs-89e426b4-1a7a-4096-82ef-7b0b30b10756' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-89e426b4-1a7a-4096-82ef-7b0b30b10756' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ffbdab14-8f34-43ab-9828-44aeecdc61db' class='xr-var-data-in' type='checkbox'><label for='data-ffbdab14-8f34-43ab-9828-44aeecdc61db' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.02270314, 0.03294724, 0.022726  , ..., 0.02398441, 0.02308738,\n","        0.02315927],\n","       [0.02318948, 0.02307032, 0.02302876, ..., 0.02304732, 0.02309998,\n","        0.02413353],\n","       [0.02370801, 0.02363846, 0.03280506, ..., 0.02320484, 0.0232124 ,\n","        0.023218  ],\n","       [0.02275257, 0.02279721, 0.03385873, ..., 0.02370923, 0.03434031,\n","        0.0260819 ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>n_steps</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>127.0 127.0 127.0 ... 127.0 127.0</div><input id='attrs-5a193a8a-268e-46bf-97e2-13d5f120f07a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5a193a8a-268e-46bf-97e2-13d5f120f07a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f0c0cdcf-2bf7-4be1-bef0-1fa40a7c54f8' class='xr-var-data-in' type='checkbox'><label for='data-f0c0cdcf-2bf7-4be1-bef0-1fa40a7c54f8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[127., 127., 127., ..., 127., 127., 127.],\n","       [127., 127., 127., ..., 127., 127., 127.],\n","       [127., 127., 127., ..., 127., 127., 127.],\n","       [127., 127., 127., ..., 127., 127., 127.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>process_time_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0227 0.02295 ... 0.02334 0.02608</div><input id='attrs-2cea6153-9922-4cd9-9316-06ddbd2e6685' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2cea6153-9922-4cd9-9316-06ddbd2e6685' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-efde3514-42c6-4835-9501-a48bd23f8bcf' class='xr-var-data-in' type='checkbox'><label for='data-efde3514-42c6-4835-9501-a48bd23f8bcf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.02270307, 0.02295174, 0.02272625, ..., 0.02394016, 0.02308754,\n","        0.02315932],\n","       [0.02318973, 0.02307069, 0.02302932, ..., 0.02304765, 0.02309418,\n","        0.02413413],\n","       [0.02370798, 0.0236385 , 0.02380545, ..., 0.02320512, 0.02321227,\n","        0.02321837],\n","       [0.0227525 , 0.02279722, 0.02286257, ..., 0.02370952, 0.02334479,\n","        0.02608184]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.02382 0.02382 ... 0.03392 0.03392</div><input id='attrs-de6ec325-e603-41bf-b700-ebc6b20a0352' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-de6ec325-e603-41bf-b700-ebc6b20a0352' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-35d2f4c8-e4bc-45f9-83f8-8b93172f2e00' class='xr-var-data-in' type='checkbox'><label for='data-35d2f4c8-e4bc-45f9-83f8-8b93172f2e00' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.02382035, 0.02382035, 0.02382035, ..., 0.02382035, 0.02382035,\n","        0.02382035],\n","       [0.03579132, 0.03579132, 0.03579132, ..., 0.03579132, 0.03579132,\n","        0.03579132],\n","       [0.02571738, 0.02571738, 0.02571738, ..., 0.02571738, 0.02571738,\n","        0.02571738],\n","       [0.03391548, 0.03391548, 0.03391548, ..., 0.03391548, 0.03391548,\n","        0.03391548]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>reached_max_treedepth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-e336faa9-11a5-43fa-a0d2-21510868194e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e336faa9-11a5-43fa-a0d2-21510868194e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ee88309f-f0ed-4481-a5e1-c3e95d37fd26' class='xr-var-data-in' type='checkbox'><label for='data-ee88309f-f0ed-4481-a5e1-c3e95d37fd26' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-bee73321-9a92-44b5-8b6d-a59fc0ec6672' class='xr-section-summary-in' type='checkbox'  checked><label for='section-bee73321-9a92-44b5-8b6d-a59fc0ec6672' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:35:31.551534</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>184.01401925086975</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_observed_data8b2078b6-6ab4-455d-89d9-fc8f53abd8f4\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_observed_data8b2078b6-6ab4-455d-89d9-fc8f53abd8f4\" class = \"xr-section-summary\">observed_data</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:  (obs_id: 415)\n","Coordinates:\n","  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 407 408 409 410 411 412 413 414\n","Data variables:\n","    y_est    (obs_id) float64 47.0 44.0 47.0 37.0 33.0 ... 32.0 40.0 31.0 48.0\n","Attributes:\n","    created_at:                 2023-12-19T07:35:31.558202\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-9f47f049-955b-480d-a321-b1f080de809a' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-9f47f049-955b-480d-a321-b1f080de809a' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 415</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-961ee018-cba7-40f2-ac94-576119df4167' class='xr-section-summary-in' type='checkbox'  checked><label for='section-961ee018-cba7-40f2-ac94-576119df4167' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 410 411 412 413 414</div><input id='attrs-7a1cbbd3-9e74-44eb-8208-56e1400eb185' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7a1cbbd3-9e74-44eb-8208-56e1400eb185' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-77ebf0f7-3b1e-465f-937b-4b13cb0710de' class='xr-var-data-in' type='checkbox'><label for='data-77ebf0f7-3b1e-465f-937b-4b13cb0710de' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 412, 413, 414])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-b31b268b-4a14-464a-8c53-23d9a886550f' class='xr-section-summary-in' type='checkbox'  checked><label for='section-b31b268b-4a14-464a-8c53-23d9a886550f' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>y_est</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>47.0 44.0 47.0 ... 40.0 31.0 48.0</div><input id='attrs-24b90b9b-51f7-4339-84fe-6425ba13b7d0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-24b90b9b-51f7-4339-84fe-6425ba13b7d0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f79bcd36-a5e3-42fb-b75e-08ade9629194' class='xr-var-data-in' type='checkbox'><label for='data-f79bcd36-a5e3-42fb-b75e-08ade9629194' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([47., 44., 47., 37., 33., 37., 37., 48., 38., 41., 35., 42., 33.,\n","       34., 49., 37., 36., 52., 36., 51., 45., 33., 37., 42., 51., 46.,\n","       36., 52., 48., 36., 52., 31., 50., 33., 40., 48., 21., 43., 28.,\n","       45., 45., 42., 42., 38., 44., 42., 37., 42., 33., 30., 60., 34.,\n","       44., 37., 19., 55., 39., 39., 42., 43., 41., 39., 42., 37., 55.,\n","       55., 46., 44., 44., 35., 41., 42., 49., 33., 38., 42., 26., 28.,\n","       59., 52., 35., 38., 31., 55., 31., 59., 41., 44., 47., 49., 41.,\n","       36., 44., 48., 42., 47., 39., 41., 52., 48., 38., 34., 24., 41.,\n","       49., 42., 53., 47., 40., 49., 35., 49., 52., 56., 57., 50., 55.,\n","       44., 37., 53., 38., 48., 43., 42., 36., 42., 42., 32., 31., 35.,\n","       45., 40., 49., 47., 40., 40., 46., 50., 43., 36., 35., 47., 50.,\n","       44., 34., 26., 42., 48., 41., 46., 43., 40., 52., 46., 41., 46.,\n","       40., 42., 41., 48., 49., 46., 35., 37., 45., 37., 36., 35., 45.,\n","       35., 40., 35., 49., 39., 38., 45., 40., 37., 36., 42., 32., 40.,\n","       45., 33., 45., 42., 40., 23., 32., 50., 44., 40., 36., 28., 51.,\n","       40., 33., 29., 37., 38., 38., 26., 40., 41., 43., 44., 38., 34.,\n","       46., 43., 42., 43., 40., 33., 44., 38., 40., 43., 31., 51., 50.,\n","       42., 41., 34., 38., 37., 42., 41., 27., 46., 33., 35., 48., 39.,\n","       41., 43., 31., 40., 38., 43., 38., 36., 41., 48., 44., 28., 36.,\n","       32., 42., 30., 40., 43., 36., 38., 25., 41., 35., 36., 45., 35.,\n","       36., 33., 42., 28., 43., 44., 38., 31., 33., 29., 43., 47., 42.,\n","       48., 27., 36., 31., 48., 34., 40., 32., 46., 34., 39., 36., 37.,\n","       39., 47., 44., 37., 40., 50., 35., 42., 24., 38., 41., 45., 35.,\n","       44., 46., 39., 52., 33., 35., 38., 39., 36., 42., 45., 37., 19.,\n","       27., 52., 49., 48., 28., 38., 53., 50., 41., 46., 42., 29., 20.,\n","       39., 32., 37., 37., 43., 32., 35., 44., 47., 32., 51., 37., 38.,\n","       36., 40., 58., 40., 39., 46., 27., 28., 42., 26., 56., 41., 55.,\n","       44., 30., 23., 40., 52., 44., 26., 49., 32., 36., 26., 40., 37.,\n","       34., 56., 33., 40., 51., 37., 38., 33., 45., 37., 32., 22., 31.,\n","       31., 44., 40., 34., 42., 28., 55., 26., 39., 36., 33., 34., 42.,\n","       44., 34., 35., 40., 43., 52., 21., 25., 39., 41., 42., 42., 55.,\n","       32., 38., 33., 48., 49., 30., 44., 36., 32., 40., 31., 48.])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-76fe3809-f15f-4e7c-9ca1-6b1b749ca4a9' class='xr-section-summary-in' type='checkbox'  checked><label for='section-76fe3809-f15f-4e7c-9ca1-6b1b749ca4a9' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:35:31.558202</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_constant_datae42e8cb0-abf2-4c55-b140-25df9f14086d\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_constant_datae42e8cb0-abf2-4c55-b140-25df9f14086d\" class = \"xr-section-summary\">constant_data</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:  (obs_id: 415)\n","Coordinates:\n","  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 407 408 409 410 411 412 413 414\n","Data variables:\n","    x        (obs_id) int32 30 30 31 47 50 42 37 33 ... 42 47 36 48 45 27 46 30\n","    site     (obs_id) int32 0 0 0 0 0 0 0 0 0 0 0 0 ... 4 4 4 4 4 4 4 4 4 4 4 4\n","Attributes:\n","    created_at:                 2023-12-19T07:35:31.559756\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-34b5547e-5416-4237-83c0-a53884585903' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-34b5547e-5416-4237-83c0-a53884585903' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 415</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-f16a579e-e1ea-4f1e-951b-45515dec9806' class='xr-section-summary-in' type='checkbox'  checked><label for='section-f16a579e-e1ea-4f1e-951b-45515dec9806' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 410 411 412 413 414</div><input id='attrs-0756012f-302b-4220-8720-54ed17010518' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0756012f-302b-4220-8720-54ed17010518' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d196910f-5621-4416-85c9-bc31823b059e' class='xr-var-data-in' type='checkbox'><label for='data-d196910f-5621-4416-85c9-bc31823b059e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 412, 413, 414])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-aa406cfa-2e51-401f-a8d3-0bace4ccdc81' class='xr-section-summary-in' type='checkbox'  checked><label for='section-aa406cfa-2e51-401f-a8d3-0bace4ccdc81' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>x</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>30 30 31 47 50 ... 48 45 27 46 30</div><input id='attrs-7bffa3fc-2d81-4a85-aca4-225b386f6f31' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7bffa3fc-2d81-4a85-aca4-225b386f6f31' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-602a58de-d3b1-4309-bbe4-274d321b0ea8' class='xr-var-data-in' type='checkbox'><label for='data-602a58de-d3b1-4309-bbe4-274d321b0ea8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([30, 30, 31, 47, 50, 42, 37, 33, 42, 40, 53, 34, 40, 40, 33, 42, 49,\n","       57, 44, 39, 39, 41, 42, 30, 39, 39, 43, 34, 27, 46, 43, 38, 29, 28,\n","       42, 38, 40, 27, 50, 28, 37, 32, 34, 42, 37, 36, 40, 36, 52, 46, 35,\n","       48, 48, 47, 47, 36, 39, 40, 40, 39, 49, 47, 40, 50, 37, 35, 45, 44,\n","       39, 47, 36, 34, 30, 41, 51, 43, 54, 43, 34, 35, 39, 36, 48, 32, 43,\n","       24, 33, 36, 39, 36, 38, 41, 37, 39, 37, 36, 41, 35, 39, 42, 44, 37,\n","       55, 37, 42, 39, 38, 34, 35, 39, 35, 34, 39, 31, 27, 34, 39, 36, 40,\n","       43, 45, 41, 47, 39, 45, 39, 39, 34, 42, 43, 37, 41, 42, 38, 43, 31,\n","       35, 45, 42, 41, 58, 47, 33, 40, 34, 45, 38, 31, 40, 37, 36, 37, 38,\n","       35, 34, 44, 44, 36, 36, 39, 40, 30, 47, 35, 48, 42, 42, 40, 35, 36,\n","       28, 47, 27, 49, 41, 37, 37, 41, 49, 54, 50, 36, 43, 35, 33, 40, 39,\n","       39, 46, 26, 49, 36, 42, 43, 33, 46, 46, 51, 43, 38, 44, 49, 26, 31,\n","       50, 47, 42, 46, 36, 40, 33, 33, 50, 43, 30, 36, 37, 30, 42, 39, 46,\n","       39, 28, 52, 26, 43, 38, 38, 46, 39, 44, 41, 44, 42, 30, 39, 45, 46,\n","       38, 36, 42, 39, 41, 37, 32, 49, 40, 42, 43, 48, 47, 35, 44, 35, 48,\n","       38, 45, 34, 30, 35, 45, 42, 32, 39, 38, 33, 35, 36, 36, 46, 43, 26,\n","       34, 37, 44, 41, 50, 22, 43, 41, 57, 43, 45, 39, 43, 41, 57, 35, 43,\n","       39, 38, 33, 55, 38, 46, 42, 48, 26, 40, 29, 36, 43, 32, 42, 42, 39,\n","       33, 39, 34, 35, 47, 53, 53, 33, 36, 37, 42, 33, 29, 40, 38, 48, 39,\n","       45, 52, 33, 37, 35, 46, 38, 48, 46, 32, 36, 53, 40, 44, 38, 35, 41,\n","       38, 45, 42, 28, 50, 53, 35, 60, 36, 52, 35, 48, 48, 32, 42, 39, 45,\n","       57, 39, 41, 45, 40, 46, 40, 50, 41, 41, 47, 31, 42, 42, 38, 42, 47,\n","       45, 54, 47, 53, 39, 52, 49, 41, 39, 24, 56, 41, 51, 35, 44, 39, 38,\n","       48, 45, 44, 45, 31, 43, 47, 55, 44, 36, 35, 36, 41, 39, 40, 39, 42,\n","       47, 36, 48, 45, 27, 46, 30], dtype=int32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>site</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>0 0 0 0 0 0 0 0 ... 4 4 4 4 4 4 4 4</div><input id='attrs-2cb4fb3e-c06a-419a-bbab-44b9d4344505' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2cb4fb3e-c06a-419a-bbab-44b9d4344505' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-80797f03-61e1-48cd-bca3-78487d4eb902' class='xr-var-data-in' type='checkbox'><label for='data-80797f03-61e1-48cd-bca3-78487d4eb902' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n","       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n","       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n","       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n","       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,\n","       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2,\n","       2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n","       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,\n","       4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,\n","       4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,\n","       4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,\n","       4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,\n","       4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],\n","      dtype=int32)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-709b1198-2e32-4cb2-915a-937a34beb59f' class='xr-section-summary-in' type='checkbox'  checked><label for='section-709b1198-2e32-4cb2-915a-937a34beb59f' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:35:31.559756</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_predictions_constant_dataed0ee01e-ca8c-48e2-b6a5-b4a2343548bf\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_predictions_constant_dataed0ee01e-ca8c-48e2-b6a5-b4a2343548bf\" class = \"xr-section-summary\">predictions_constant_data</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:  (obs_id: 40)\n","Coordinates:\n","  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 8 9 ... 31 32 33 34 35 36 37 38 39\n","Data variables:\n","    x        (obs_id) int32 23 34 33 36 41 40 44 39 ... 38 38 34 35 51 25 39 39\n","    site     (obs_id) int32 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0\n","Attributes:\n","    created_at:                 2023-12-19T07:36:01.529284\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-350debf4-8231-4a9c-918e-333b97dcb8d2' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-350debf4-8231-4a9c-918e-333b97dcb8d2' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 40</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-4d794eb8-5ca6-4d20-96ab-969acd1b1a42' class='xr-section-summary-in' type='checkbox'  checked><label for='section-4d794eb8-5ca6-4d20-96ab-969acd1b1a42' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 34 35 36 37 38 39</div><input id='attrs-1462c5b9-b90b-4af3-b6ef-063c5bcc24e0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-1462c5b9-b90b-4af3-b6ef-063c5bcc24e0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3ca59cc8-f252-454a-9630-1850e85f156b' class='xr-var-data-in' type='checkbox'><label for='data-3ca59cc8-f252-454a-9630-1850e85f156b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,\n","       18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,\n","       36, 37, 38, 39])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-7e85ce98-a16f-4cf6-b6ff-4a1120f7ecd6' class='xr-section-summary-in' type='checkbox'  checked><label for='section-7e85ce98-a16f-4cf6-b6ff-4a1120f7ecd6' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>x</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>23 34 33 36 41 ... 35 51 25 39 39</div><input id='attrs-e51a23f3-5118-45d7-b170-8497a36a8a46' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e51a23f3-5118-45d7-b170-8497a36a8a46' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ac58ec50-be7b-4d11-8e0e-2ba2fcb899c4' class='xr-var-data-in' type='checkbox'><label for='data-ac58ec50-be7b-4d11-8e0e-2ba2fcb899c4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([23, 34, 33, 36, 41, 40, 44, 39, 37, 41, 42, 42, 38, 35, 45, 43, 38,\n","       35, 33, 39, 36, 36, 31, 38, 50, 37, 51, 32, 33, 44, 43, 47, 38, 38,\n","       34, 35, 51, 25, 39, 39], dtype=int32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>site</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0</div><input id='attrs-ac85551a-f1e3-44f6-a78d-0dfeff51fd49' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ac85551a-f1e3-44f6-a78d-0dfeff51fd49' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4c591129-e917-446c-9127-ccfb3b9e70d0' class='xr-var-data-in' type='checkbox'><label for='data-4c591129-e917-446c-9127-ccfb3b9e70d0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n","       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=int32)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-6849feed-69c7-4b07-a320-4e2896a225e6' class='xr-section-summary-in' type='checkbox'  checked><label for='section-6849feed-69c7-4b07-a320-4e2896a225e6' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:36:01.529284</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","              </ul>\n","            </div>\n","            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-sections.group-sections {\n","  grid-template-columns: auto;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt, dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n",".xr-wrap{width:700px!important;} </style>"],"text/plain":["Inference data with groups:\n","\t> posterior\n","\t> predictions\n","\t> log_likelihood\n","\t> sample_stats\n","\t> observed_data\n","\t> constant_data\n","\t> predictions_constant_data"]},"execution_count":89,"metadata":{},"output_type":"execute_result"}],"source":["pred_trace"]},{"cell_type":"markdown","metadata":{"id":"F750803C75AD4BBBB3AB1B83D5EF673F","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 组内预测 vs 组外预测  \n","\n","* 现在，对于原有站点和新站点，通过MCMC采样，我们都得到了对应站点下对斜率和截距的估计  \n","\n","    * 在原有站点中，斜率和截距的变量名为beta_0j，beta_1j；在新站点中二者的名字则为new_beta_0j，new_beta_1j  \n","\n","* 假设我们想知道当压力分数为40时，自我控制分数为多少，那么可以根据 $\\mu_{ij} = \\beta_{0j} + \\beta_{1j} \\cdot 40$ 对该数据点的观测值做出预测  \n","\n","* 在MCMC采样中，对于每个站点，都生成了20000对参数估计值，$\\left\\lbrace \\beta_{0j}^{(i)}, \\beta_1^{(i)}\\right\\rbrace$。因此，代入X值后，对于每个站点我们都能获得20000个对应的预测值"]},{"cell_type":"code","execution_count":90,"metadata":{"collapsed":false,"id":"915DC414DD6A4DBA925EE8E0BE8D1C22","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[],"source":["#建立空dataframe，储存后验预测的结果\n","col = df_first5[\"Site\"].unique()\n","pred_result = pd.DataFrame(columns=col)\n","#对每一个站点，提取后验参数的结果代入公式计算，并将计算结果存储在数据框的不同列\n","for site in df_first5[\"Site\"].unique():\n","    pred = (40 * (var_both_trace.posterior['beta_1j'].sel(site = f\"{site}\")) +\\\n","    (var_both_trace.posterior['beta_0j'].sel(site = f\"{site}\"))).stack(sample=(\"chain\",\"draw\")).values\n","    pred_result[site] = pred"]},{"cell_type":"code","execution_count":91,"metadata":{"collapsed":false,"id":"B8651BFC972947B5B2F7894406A33711","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>Kassel</th>\n","      <th>Portugal</th>\n","      <th>Southampton</th>\n","      <th>Tsinghua</th>\n","      <th>UCSB</th>\n","      <th>Zurich</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>39.562814</td>\n","      <td>45.112704</td>\n","      <td>40.492186</td>\n","      <td>39.751103</td>\n","      <td>39.251714</td>\n","      <td>37.331538</td>\n","    </tr>\n","    <tr>\n","      <th>1</th>\n","      <td>41.897816</td>\n","      <td>47.252798</td>\n","      <td>37.287959</td>\n","      <td>39.295603</td>\n","      <td>40.789557</td>\n","      <td>32.677484</td>\n","    </tr>\n","    <tr>\n","      <th>2</th>\n","      <td>41.107089</td>\n","      <td>42.565081</td>\n","      <td>40.537043</td>\n","      <td>39.151684</td>\n","      <td>39.239426</td>\n","      <td>42.179472</td>\n","    </tr>\n","    <tr>\n","      <th>3</th>\n","      <td>40.033072</td>\n","      <td>46.059016</td>\n","      <td>40.606599</td>\n","      <td>39.628171</td>\n","      <td>39.119121</td>\n","      <td>43.557299</td>\n","    </tr>\n","    <tr>\n","      <th>4</th>\n","      <td>40.813528</td>\n","      <td>45.432646</td>\n","      <td>39.480795</td>\n","      <td>38.963377</td>\n","      <td>39.450079</td>\n","      <td>47.701150</td>\n","    </tr>\n","    <tr>\n","      <th>...</th>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","    </tr>\n","    <tr>\n","      <th>19995</th>\n","      <td>39.694040</td>\n","      <td>45.579483</td>\n","      <td>39.947529</td>\n","      <td>39.193291</td>\n","      <td>39.105715</td>\n","      <td>41.863919</td>\n","    </tr>\n","    <tr>\n","      <th>19996</th>\n","      <td>40.663213</td>\n","      <td>42.510325</td>\n","      <td>41.701204</td>\n","      <td>40.259021</td>\n","      <td>40.430954</td>\n","      <td>38.299519</td>\n","    </tr>\n","    <tr>\n","      <th>19997</th>\n","      <td>41.125972</td>\n","      <td>45.183243</td>\n","      <td>40.863587</td>\n","      <td>40.201528</td>\n","      <td>39.839498</td>\n","      <td>42.452076</td>\n","    </tr>\n","    <tr>\n","      <th>19998</th>\n","      <td>41.519790</td>\n","      <td>46.113326</td>\n","      <td>40.331410</td>\n","      <td>39.348882</td>\n","      <td>39.910313</td>\n","      <td>44.454457</td>\n","    </tr>\n","    <tr>\n","      <th>19999</th>\n","      <td>40.813025</td>\n","      <td>44.454988</td>\n","      <td>39.461055</td>\n","      <td>39.897006</td>\n","      <td>39.675046</td>\n","      <td>41.165114</td>\n","    </tr>\n","  </tbody>\n","</table>\n","<p>20000 rows × 6 columns</p>\n","</div>"],"text/plain":["          Kassel   Portugal  Southampton   Tsinghua       UCSB     Zurich\n","0      39.562814  45.112704    40.492186  39.751103  39.251714  37.331538\n","1      41.897816  47.252798    37.287959  39.295603  40.789557  32.677484\n","2      41.107089  42.565081    40.537043  39.151684  39.239426  42.179472\n","3      40.033072  46.059016    40.606599  39.628171  39.119121  43.557299\n","4      40.813528  45.432646    39.480795  38.963377  39.450079  47.701150\n","...          ...        ...          ...        ...        ...        ...\n","19995  39.694040  45.579483    39.947529  39.193291  39.105715  41.863919\n","19996  40.663213  42.510325    41.701204  40.259021  40.430954  38.299519\n","19997  41.125972  45.183243    40.863587  40.201528  39.839498  42.452076\n","19998  41.519790  46.113326    40.331410  39.348882  39.910313  44.454457\n","19999  40.813025  44.454988    39.461055  39.897006  39.675046  41.165114\n","\n","[20000 rows x 6 columns]"]},"execution_count":91,"metadata":{},"output_type":"execute_result"}],"source":["#对于新站点，同样提取对应的参数并代入公式计算，将结果存在新列中\n","pred_trace = pred_trace.predictions.stack(sample=(\"chain\",\"draw\",\"site\"))\n","new_group_pred = (40 * (pred_trace['new_beta_1j']) + (pred_trace['new_beta_0j'])).values\n","pred_result[new_group[\"Site\"].unique()[0]] = new_group_pred \n","\n","pred_result"]},{"cell_type":"markdown","metadata":{"id":"CA8E1D3077C242A1A597B99174606E87","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["**绘制预测密度分布图**  \n","\n","* 最后，我们绘制每个站点的预测结果分布  \n","\n","* 可以看到，数据点较多的站点预测的结果比较集中，数据点较少的站点预测的结果比较分散  \n","\n","* 新站点的预测结果变异性是最大的"]},{"cell_type":"code","execution_count":92,"metadata":{"collapsed":false,"id":"6044F057C05F45B88EAA19ABFE8BA8E6","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/C8792B41759643A8B91F0EB266D9EFFB/s5wl41xi8s.png\">"],"text/plain":["<Figure size 800x800 with 6 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["# 根据列数定义画布的行数\n","fig, ax = plt.subplots(len(pred_result.columns),1, figsize = (8,8),\n","                       sharex=True,\n","                       sharey=True)\n","# 对于每一个站点，绘制其预测结果的密度分布图\n","for i,site in enumerate(pred_result.columns):\n","    az.plot_kde(pred_result[site],\n","                fill_kwargs={\"alpha\": 0.5},\n","                quantiles=[.25, .75],\n","                ax=ax[i])\n","    #设置y轴标题和刻度\n","    ax[i].set_ylabel(f'{site}', rotation=0, labelpad=40)\n","    ax[i].set_yticks([])\n","#设置x轴范围\n","plt.xlim([20,60])\n","#设置标题\n","plt.suptitle(\"Posterior predictive models for Self Control(X = 40)\",\n","             y=0.95,\n","             fontsize=15)\n","sns.despine()"]},{"cell_type":"markdown","metadata":{"id":"8FB08B1B1CE04FCAB64EA170FAA04630","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["## bambi code  \n","\n","* bambi在对层级模型进行定义时，它认为组间参数如截距/斜率，由共同部分和组间变异组成(即pymc中的non-centered定义)  \n","\n","| 模型  | 模型表达    |  \n","| -------- | ----------|  \n","| complete_pool |\"scontrol ~ stress\" |  \n","| no pool | \"scontrol ~ \"0 + stress:Site\" |  \n","| varing intercepts | \"scontrol ~ stress + (1\\|Site)\" |  \n","| varing slopes  | \"scontrol ~ stress + (0 + stress\\|Site)\" |  \n","| varing intercepts and slopes  |\"scontrol ~ 1 + stress + (1 + stress\\|Site)\"  |  \n","\n","* 在bambi中，1表示添加回归截距，0表示不添加回归截距。  \n","* (...|Site)表示分层模型  \n","\t* (1|Site)表示：仅包含截距的组间变异  \n","\t* (0 + stress|Site)表示: 仅包含斜率的组间变异  \n","\t* (1 + stress|Site)表示: 包含截距和斜率的组间变异，可以写作 (stress|Site)  \n","* 注意，bambi 中无法定义真正的非池化模型  \n","\t* \"scontrol ~ \"0 + stress:Site\"仅假设斜率存在变异，并且各站点的斜率相互独立。  \n","\t* 因此，之后我们仅考虑用 bambi 来定义分层模型，而不是非池化的模型。"]},{"cell_type":"code","execution_count":93,"metadata":{"collapsed":false,"id":"76E2E487C1434E07A3099AD676CB2E12","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/D5D2E8311EB24389A6D82372898D12AE/s5wl41ikab.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e21a694f0>"]},"execution_count":93,"metadata":{},"output_type":"execute_result"}],"source":["# complete-pooled\n","complete_bmb = bmb.Model(\"scontrol ~ stress\",\n","                         df_first5,\n","                         family=\"gaussian\")\n","complete_bmb.build()\n","complete_bmb.graph()"]},{"cell_type":"code","execution_count":94,"metadata":{"collapsed":false,"id":"8F2436271AAE4B19B618BE9758FE982C","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/23788480235E40158B33FA69F1793C42/s5wl411ecm.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e21258040>"]},"execution_count":94,"metadata":{},"output_type":"execute_result"}],"source":["# no-pooled\n","no_bmb = bmb.Model(\"scontrol ~ 0 + stress:Site\",\n","                      df_first5)\n","no_bmb.build()\n","no_bmb.graph()"]},{"cell_type":"code","execution_count":95,"metadata":{"collapsed":false,"id":"767AD7B7B0454B049157D2B872787318","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/15ADF69835AC467187627D430F11CCAE/s5wl42y4p7.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e203b8d60>"]},"execution_count":95,"metadata":{},"output_type":"execute_result"}],"source":["# group-specific intercepts\n","inter_bmb = bmb.Model(\"scontrol ~ stress + (1|Site)\",\n","                      df_first5,\n","                      categorical=\"Site\")\n","\n","inter_bmb.build()\n","inter_bmb.graph()"]},{"cell_type":"code","execution_count":96,"metadata":{"collapsed":false,"id":"41575FCE72214565BC569AA5E46F64E9","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/0B607618194145DE97A20EF33E8D5B71/s5wl42bsch.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e1b8beb80>"]},"execution_count":96,"metadata":{},"output_type":"execute_result"}],"source":["# group-specific slopes\n","slope_bmb = bmb.Model(\"scontrol ~ stress + (0 + stress|Site)\",\n","                      df_first5,\n","                      categorical=\"Site\")\n","slope_bmb.build()\n","slope_bmb.graph()"]},{"cell_type":"code","execution_count":97,"metadata":{"collapsed":false,"id":"818CCCC47F1B4CDBADA40025579BCC4A","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/79CABC9AC4C34B8E8BF8A0D4DF7A6416/s5wl426mme.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e20e3b220>"]},"execution_count":97,"metadata":{},"output_type":"execute_result"}],"source":["# group specific intercept and slope\n","var_both_bmb = bmb.Model(\"scontrol ~ 1 + stress + (stress|Site)\",\n","                         df_first5,\n","                         categorical=\"Site\")\n","\n","var_both_bmb.build()\n","var_both_bmb.graph()"]},{"cell_type":"markdown","metadata":{"id":"1BBD494D200D44F2B8D1C7AD372D9C06","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["## 补充内容：分层模型中的组层面预测因子(group-level predictors)  \n","\n","🤔 在上面的例子中，我们考虑了个体压力对于自我控制的影响，并且分不同站点来考虑这一问题。然而，我们是否考虑过不同站点的其他特性对于自我控制的影响呢？  \n","\n","* 例如，原数据想要探究的核心问题为温度和社会行为的关系，不同站点对应了不同国家和地区，而这些地区的平均气温是否会对自我控制产生影响呢？  \n","\n","    * 由于该数据的收集时间为夏季，因此我们查阅了每一站点的夏季平均气温，作为组层面的预测变量  \n","\n","* 组层面预测因子(group-level predictors)是指在组间(站点)层面的特征，这是相对于组内预测因子(group-level predictors)而言的。  \n","    * 例如，个体压力分数(stress)是组内预测因子。这个值在不同个体间具有不同值。  \n","    * 而地区的夏季平均温度是组层面预测因子。这些值在不同站点(site)间不同，但是在站点内的个体间保持相同。  \n","\n","![Image Name](https://cdn.kesci.com/upload/s5wfm7n7r8.png?imageView2/0/w/960/h/960)  \n","\n","\n","\n"]},{"cell_type":"code","execution_count":98,"metadata":{"collapsed":false,"id":"CC268F317CC447E283411A7503843D01","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>site_idx</th>\n","      <th>obs_id</th>\n","      <th>Site</th>\n","      <th>stress</th>\n","      <th>scontrol</th>\n","      <th>avetemp</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>0</td>\n","      <td>0</td>\n","      <td>Kassel</td>\n","      <td>30</td>\n","      <td>47</td>\n","      <td>17.6</td>\n","    </tr>\n","    <tr>\n","      <th>1</th>\n","      <td>0</td>\n","      <td>1</td>\n","      <td>Kassel</td>\n","      <td>30</td>\n","      <td>44</td>\n","      <td>17.6</td>\n","    </tr>\n","    <tr>\n","      <th>2</th>\n","      <td>0</td>\n","      <td>2</td>\n","      <td>Kassel</td>\n","      <td>31</td>\n","      <td>47</td>\n","      <td>17.6</td>\n","    </tr>\n","    <tr>\n","      <th>3</th>\n","      <td>0</td>\n","      <td>3</td>\n","      <td>Kassel</td>\n","      <td>47</td>\n","      <td>37</td>\n","      <td>17.6</td>\n","    </tr>\n","    <tr>\n","      <th>4</th>\n","      <td>0</td>\n","      <td>4</td>\n","      <td>Kassel</td>\n","      <td>50</td>\n","      <td>33</td>\n","      <td>17.6</td>\n","    </tr>\n","    <tr>\n","      <th>...</th>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","    </tr>\n","    <tr>\n","      <th>410</th>\n","      <td>4</td>\n","      <td>410</td>\n","      <td>UCSB</td>\n","      <td>48</td>\n","      <td>36</td>\n","      <td>19.0</td>\n","    </tr>\n","    <tr>\n","      <th>411</th>\n","      <td>4</td>\n","      <td>411</td>\n","      <td>UCSB</td>\n","      <td>45</td>\n","      <td>32</td>\n","      <td>19.0</td>\n","    </tr>\n","    <tr>\n","      <th>412</th>\n","      <td>4</td>\n","      <td>412</td>\n","      <td>UCSB</td>\n","      <td>27</td>\n","      <td>40</td>\n","      <td>19.0</td>\n","    </tr>\n","    <tr>\n","      <th>413</th>\n","      <td>4</td>\n","      <td>413</td>\n","      <td>UCSB</td>\n","      <td>46</td>\n","      <td>31</td>\n","      <td>19.0</td>\n","    </tr>\n","    <tr>\n","      <th>414</th>\n","      <td>4</td>\n","      <td>414</td>\n","      <td>UCSB</td>\n","      <td>30</td>\n","      <td>48</td>\n","      <td>19.0</td>\n","    </tr>\n","  </tbody>\n","</table>\n","<p>415 rows × 6 columns</p>\n","</div>"],"text/plain":["     site_idx  obs_id    Site  stress  scontrol  avetemp\n","0           0       0  Kassel      30        47     17.6\n","1           0       1  Kassel      30        44     17.6\n","2           0       2  Kassel      31        47     17.6\n","3           0       3  Kassel      47        37     17.6\n","4           0       4  Kassel      50        33     17.6\n","..        ...     ...     ...     ...       ...      ...\n","410         4     410    UCSB      48        36     19.0\n","411         4     411    UCSB      45        32     19.0\n","412         4     412    UCSB      27        40     19.0\n","413         4     413    UCSB      46        31     19.0\n","414         4     414    UCSB      30        48     19.0\n","\n","[415 rows x 6 columns]"]},"execution_count":98,"metadata":{},"output_type":"execute_result"}],"source":["#选择需要的变量\n","df_temp =df_first5[[\"site_idx\",\"obs_id\",\"Site\",\"stress\",\"scontrol\"]].reset_index(drop=True)\n","levels = df_temp['Site'].unique()\n","\n","#生成各站点的夏季平均气温\n","level_mapping = {\n","    levels[0]: 17.6,\n","    levels[1]: 24.8,\n","    levels[2]: 19.9,\n","    levels[3]: 30.3,\n","    levels[4]: 19\n","}\n","\n","#将气温信息合并到数据框中\n","df_temp['avetemp'] = df_temp['Site'].map(level_mapping)\n","df_temp "]},{"cell_type":"markdown","metadata":{"id":"969BCCC5ECF74674A3F7A25CF873CEF4","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 夏季平均气温对自我控制平均分的影响  \n","\n","    * 由于我们只考虑了5个站点的数据，因此也只有5个数据点"]},{"cell_type":"code","execution_count":99,"metadata":{"collapsed":false,"id":"174FA551BD2E471F8DB8D4080911B33A","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/D4EE4073CD594A478BC92B2A5DC5F204/s5wl421q0c.png\">"],"text/plain":["<Figure size 640x480 with 1 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["sns.regplot(x=\"avetemp\", y=\"scontrol\", data=df_temp.groupby(\"Site\").mean())\n","sns.despine()"]},{"cell_type":"markdown","metadata":{"id":"9937F463FDC74FE382BCF4658B77544A","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 构建具有组层面预测因子的分层模型  \n","\n","* 我们在**变化截距**模型的基础上继续添加  \n","\n","* 回顾之前的仅包含变化的截距的分层模型：  \n","\n","$$  \n","\\begin{array}{rll}  \n","Y_{ij} | \\beta_{0j}, \\beta_1, \\sigma_y & \\sim N(\\mu_{ij}, \\sigma_y^2) \\;\\; \\text{ with } \\;\\;  \\mu_{ij} = \\beta_{0j} + \\beta_1 X_{ij} & \\text{(Layer1: 每个站点内的线性模型)} \\\\  \n","\\beta_{0j} | \\beta_0, \\sigma_0  & \\stackrel{ind}{\\sim} N(\\beta_0, \\sigma_0^2) & \\text{(Layer2: 截距在站点间的变化)} \\\\  \n","\\beta_{0}  & \\sim N(0, 50^2) & \\text{(Layer3: 全局参数的先验)} \\\\  \n","\\beta_1  & \\sim N(0, 5^2) & \\\\  \n","\\sigma_y & \\sim \\text{Exp}(1)    & \\\\  \n","\\sigma_0 & \\sim \\text{Exp}(1).    & \\\\  \n","\\end{array}  \n","$$  \n","\n","🤔 如果我们想考虑组层面预测因子，那么该变量该放在哪个层呐(Layer)？  \n","* 由于组层面预测因子是组间(站点$j$)层面的特征，因此该变量主要影响截距在站点间的变化。  \n","* 公式写作： $\\beta_{0j} = \\gamma_0 + \\gamma_1 U_j$  \n","  * 其中，$U_j$是站点$j$的组层面预测因子  \n","  * $\\gamma_1$是组层面预测因子$U_j$的回归系数；而$\\gamma_0$为站点间的变化的截距。  \n","  * 因此，每个站点的截距 $\\beta_{0j}$，受到组层面的预测因子$U_j$的影响。  \n","* 也可以写作 $\\mu_{ij} = \\beta_{0j} + \\beta_1 X_{ij} = (\\gamma_0 + \\gamma_1 U_j) + \\beta_1 X_{ij}$"]},{"cell_type":"markdown","metadata":{"id":"B4AF80A55BB842EB821A089C20B5BF2F","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["**总的公式**  \n","\n","将 $\\beta_{0j} = \\gamma_0 + \\gamma_1 U_j$ 放入之前的公式，并且为新参数$\\gamma_0$和$\\gamma_1$引入先验分布：  \n","\n","$$  \n","\\begin{array}{rll}  \n","Y_{ij} | \\beta_{0j}, \\beta_1, \\sigma_y & \\sim N(\\mu_{ij}, \\sigma_y^2) \\;\\; \\text{ with } \\;\\;  \\mu_{ij} = \\beta_{0j} + \\beta_1 X_{ij} & \\text{(Layer1: 每个站点内的线性模型)} \\\\  \n","\\beta_{0j} | \\gamma_0, \\gamma_1, \\sigma_0  & \\stackrel{ind}{\\sim} N(\\gamma_0 + \\gamma_1 U_j, \\sigma_0^2) & \\text{(Layer2: 截距在站点间的变化)} \\\\  \n","\\gamma_0  & \\sim N(0, 50^2) & \\text{(Layer3: 全局参数的先验)} \\\\  \n","\\gamma_1 & \\sim N(0, 5^2) & \\\\  \n","\\beta_1  & \\sim N(0, 5^2) & \\\\  \n","\\sigma_y & \\sim \\text{Exp}(1)    & \\\\  \n","\\sigma_0 & \\sim \\text{Exp}(1).    & \\\\  \n","\\end{array}  \n","$$"]},{"cell_type":"markdown","metadata":{"id":"7549651825E74533BD28F20E7174B332","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["**另一种定义形式**  \n","\n","* 在此前我们认为$\\beta_{0j}= \\beta_0 + b_{0j}$，即在共同截距的基础上增加组的变异  \n","\n","* 但在具有组层面(group-level)预测因子的模型中，实际上截距又会受到组层面的影响  \n","\n","    * 相当于：$\\beta_{0} = \\gamma_0 + \\gamma_1 U_j$  \n","\n","    * $\\beta_{0j} = \\gamma_0 + \\gamma_1 U_j + b_{0j}$  \n","\n","    * 进一步将 $\\beta_{0j}$ 放入 $\\mu_{ij} = \\beta_{0j} + \\beta_1 X_{ij}$中:  \n","    \n","* $\\mu_{ij} = (\\gamma_0 + \\gamma_1 U_j + b_{0j}) + \\beta_1 X_{ij}$  \n","\n","* 整理有：  \n","\n","$$  \n","\\begin{array}{rll}  \n","Y_{ij} | \\beta_{0j}, \\beta_1, \\sigma_y & \\sim N(\\mu_{ij}, \\sigma_y^2) \\;\\; \\text{ with } \\;\\;  \\mu_{ij} = (\\gamma_0 + \\gamma_1 U_j + b_{0j}) + \\beta_1 X_{ij} & \\text{(Layer1: 每个站点内的线性模型)} \\\\  \n","b_{0j} | \\sigma_0 & \\stackrel{ind}{\\sim} N(0, \\sigma_0^2) & \\text{(Layer2: 截距在站点间的变化)} \\\\  \n","\\gamma_0  & \\sim N(0, 50^2) & \\text{(Layer3: 全局参数的先验)} \\\\  \n","\\gamma_1 & \\sim N(0, 5^2) & \\\\  \n","\\beta_1  & \\sim N(0, 5^2) & \\\\  \n","\\sigma_y & \\sim \\text{Exp}(1)    & \\\\  \n","\\sigma_0 & \\sim \\text{Exp}(1).    & \\\\  \n","\\end{array}  \n","$$  \n","\n"]},{"cell_type":"code","execution_count":100,"metadata":{"collapsed":false,"id":"27D96B30463041408339690D382CDFB7","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Auto-assigning NUTS sampler...\n","Initializing NUTS using jitter+adapt_diag...\n","Multiprocess sampling (4 chains in 4 jobs)\n","NUTS: [gamma_0, gamma_1, beta_1, sigma_y, sigma_0, beta_0_offset]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 256 seconds.\n"]}],"source":["# 我们采用第二种定义方式\n","\n","#定义数据坐标，包括站点和观测索引\n","coords = {\"site\": df_temp[\"Site\"].unique(),\n","        \"obs_id\": df_temp.obs_id}\n","\n","with pm.Model(coords=coords) as group_pred_model:\n","    #定义全局参数\n","    gamma_0 = pm.Normal(\"gamma_0\", mu=0, sigma=50)\n","    gamma_1 = pm.Normal(\"gamma_1\", mu=0, sigma=5) \n","    beta_1 = pm.Normal(\"beta_1\", mu=0, sigma=5) \n","    sigma_y = pm.Exponential(\"sigma_y\", 1) \n","    sigma_0 = pm.Exponential(\"sigma_0\", 1)\n","\n","    #传入自变量、获得观测值对应的站点映射\n","    x = pm.MutableData(\"x\", df_temp.stress, dims=\"obs_id\")\n","    u = pm.MutableData(\"u\", df_temp.avetemp.unique(), dims=\"site\")\n","    site_idx = pm.MutableData(\"site\", df_temp.site_idx, dims=\"obs_id\") \n","\n","    #定义组层面变量\n","    beta_0 = pm.Deterministic(\"beta_0\", gamma_0 + gamma_1*u, dims=\"site\")\n","    beta_0_offset = pm.Normal(\"beta_0_offset\", 0, sigma=1, dims=\"site\")\n","    beta_0j = pm.Deterministic(\"beta_0j\", beta_0 + sigma_0*beta_0_offset, dims=\"site\")\n","\n","    #线性关系\n","    mu = pm.Deterministic(\"mu\", beta_0j[site_idx]+beta_1*x, dims=\"obs_id\")\n"," \n","    # 定义 likelihood\n","    likelihood = pm.Normal(\"y_est\", mu=mu, sigma=sigma_y, observed=df_temp.scontrol, dims=\"obs_id\")\n","\n","    group_pred_trace = pm.sample(draws=5000,           # 使用mcmc方法进行采样，draws为采样次数\n","                        tune=1000,                    # tune为调整采样策略的次数，可以决定这些结果是否要被保留\n","                        chains=4,                     # 链数\n","                        discard_tuned_samples= True,  # tune的结果将在采样结束后被丢弃\n","                        random_seed=84735,\n","                        target_accept=0.99)"]},{"cell_type":"code","execution_count":101,"metadata":{"collapsed":false,"id":"7A4674DB199A4D0497D9C3109F35F6B9","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/D3C4C24C45AC429583D198919189BB48/s5wlbk6idf.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e1b6df070>"]},"execution_count":101,"metadata":{},"output_type":"execute_result"}],"source":["pm.model_to_graphviz(group_pred_model)"]},{"cell_type":"markdown","metadata":{"id":"14FB9981D1444576BCA027BDCD6864B8","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["#### bambi code  \n","\n","* 当模型变得复杂， 在 PyMC 中定义分层模型将变得困难。  \n","\n","* 使用 Bambi 可以简化这一过程，其模型定义公式为 `\"stress + avetemp + (stress|Site)\"`  \n","\n","    * 只需要在原来层级模型的基础上加入组层面预测因子即可"]},{"cell_type":"code","execution_count":102,"metadata":{"collapsed":false,"id":"BDB62504F041442AB80E33C542CE4DA8","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/C95EDB86DBCC47268B2F66D6862122FE/s5wlbkl9o1.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e1bc70970>"]},"execution_count":102,"metadata":{},"output_type":"execute_result"}],"source":["group_pred_bmb = bmb.Model(\"scontrol ~ stress + avetemp + (stress|Site)\",\n","                      df_temp,\n","                      categorical=\"Site\")\n","\n","group_pred_bmb.build()\n","group_pred_bmb.graph()"]},{"cell_type":"markdown","metadata":{"id":"5C6582B5DB93412A9E6988584578C3BB","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["###  MCMC采样&后验参数估计  \n","\n","* 可以看到组层面预测因子(平均最低气温)的回归斜率$\\gamma_{1j}$和截距$\\gamma_{0j}$"]},{"cell_type":"code","execution_count":103,"metadata":{"collapsed":false,"id":"7A942338340247E2A19148889777B28E","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>mean</th>\n","      <th>sd</th>\n","      <th>hdi_3%</th>\n","      <th>hdi_97%</th>\n","      <th>mcse_mean</th>\n","      <th>mcse_sd</th>\n","      <th>ess_bulk</th>\n","      <th>ess_tail</th>\n","      <th>r_hat</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>gamma_0</th>\n","      <td>62.986</td>\n","      <td>5.463</td>\n","      <td>51.922</td>\n","      <td>72.399</td>\n","      <td>0.073</td>\n","      <td>0.052</td>\n","      <td>6179.0</td>\n","      <td>6585.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>gamma_1</th>\n","      <td>0.014</td>\n","      <td>0.221</td>\n","      <td>-0.368</td>\n","      <td>0.468</td>\n","      <td>0.003</td>\n","      <td>0.003</td>\n","      <td>6030.0</td>\n","      <td>6941.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[Kassel]</th>\n","      <td>63.709</td>\n","      <td>1.978</td>\n","      <td>60.006</td>\n","      <td>67.449</td>\n","      <td>0.016</td>\n","      <td>0.011</td>\n","      <td>15661.0</td>\n","      <td>13706.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[Portugal]</th>\n","      <td>65.793</td>\n","      <td>2.353</td>\n","      <td>61.168</td>\n","      <td>70.013</td>\n","      <td>0.020</td>\n","      <td>0.014</td>\n","      <td>13425.0</td>\n","      <td>13954.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[Southampton]</th>\n","      <td>62.594</td>\n","      <td>2.566</td>\n","      <td>57.563</td>\n","      <td>67.274</td>\n","      <td>0.022</td>\n","      <td>0.015</td>\n","      <td>14134.0</td>\n","      <td>14330.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[Tsinghua]</th>\n","      <td>62.113</td>\n","      <td>1.954</td>\n","      <td>58.447</td>\n","      <td>65.779</td>\n","      <td>0.016</td>\n","      <td>0.011</td>\n","      <td>15072.0</td>\n","      <td>13515.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0j[UCSB]</th>\n","      <td>62.450</td>\n","      <td>2.077</td>\n","      <td>58.514</td>\n","      <td>66.331</td>\n","      <td>0.017</td>\n","      <td>0.012</td>\n","      <td>14341.0</td>\n","      <td>12870.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1</th>\n","      <td>-0.566</td>\n","      <td>0.047</td>\n","      <td>-0.655</td>\n","      <td>-0.477</td>\n","      <td>0.000</td>\n","      <td>0.000</td>\n","      <td>15049.0</td>\n","      <td>12525.0</td>\n","      <td>1.0</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                        mean     sd  hdi_3%  hdi_97%  mcse_mean  mcse_sd  \\\n","gamma_0               62.986  5.463  51.922   72.399      0.073    0.052   \n","gamma_1                0.014  0.221  -0.368    0.468      0.003    0.003   \n","beta_0j[Kassel]       63.709  1.978  60.006   67.449      0.016    0.011   \n","beta_0j[Portugal]     65.793  2.353  61.168   70.013      0.020    0.014   \n","beta_0j[Southampton]  62.594  2.566  57.563   67.274      0.022    0.015   \n","beta_0j[Tsinghua]     62.113  1.954  58.447   65.779      0.016    0.011   \n","beta_0j[UCSB]         62.450  2.077  58.514   66.331      0.017    0.012   \n","beta_1                -0.566  0.047  -0.655   -0.477      0.000    0.000   \n","\n","                      ess_bulk  ess_tail  r_hat  \n","gamma_0                 6179.0    6585.0    1.0  \n","gamma_1                 6030.0    6941.0    1.0  \n","beta_0j[Kassel]        15661.0   13706.0    1.0  \n","beta_0j[Portugal]      13425.0   13954.0    1.0  \n","beta_0j[Southampton]   14134.0   14330.0    1.0  \n","beta_0j[Tsinghua]      15072.0   13515.0    1.0  \n","beta_0j[UCSB]          14341.0   12870.0    1.0  \n","beta_1                 15049.0   12525.0    1.0  "]},"execution_count":103,"metadata":{},"output_type":"execute_result"}],"source":["az.summary(group_pred_trace,\n","           var_names=[\"gamma_0\",\"gamma_1\",\"beta_0j\",\"beta_1\"])"]},{"cell_type":"code","execution_count":104,"metadata":{"collapsed":false,"id":"B67D7F2527114DDE841E18A0A561F1B7","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["\n","            <div>\n","              <div class='xr-header'>\n","                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n","              </div>\n","              <ul class=\"xr-sections group-sections\">\n","              \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_posterior780e33bb-e96c-45c8-a4e6-8578b94d8626\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_posterior780e33bb-e96c-45c8-a4e6-8578b94d8626\" class = \"xr-section-summary\">posterior</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:        (chain: 4, draw: 5000, site: 5, obs_id: 415)\n","Coordinates:\n","  * chain          (chain) int64 0 1 2 3\n","  * draw           (draw) int64 0 1 2 3 4 5 6 ... 4994 4995 4996 4997 4998 4999\n","  * site           (site) &lt;U11 &#x27;Kassel&#x27; &#x27;Portugal&#x27; ... &#x27;Tsinghua&#x27; &#x27;UCSB&#x27;\n","  * obs_id         (obs_id) int64 0 1 2 3 4 5 6 ... 408 409 410 411 412 413 414\n","Data variables:\n","    gamma_0        (chain, draw) float64 63.08 64.02 62.87 ... 65.62 64.81 64.98\n","    gamma_1        (chain, draw) float64 0.07942 -0.1445 ... -0.2493 -0.2717\n","    beta_1         (chain, draw) float64 -0.6163 -0.5111 ... -0.4943 -0.4932\n","    beta_0_offset  (chain, draw, site) float64 0.4122 0.5593 ... 0.2221 0.01484\n","    sigma_y        (chain, draw) float64 6.19 6.356 6.418 ... 6.558 6.681 6.657\n","    sigma_0        (chain, draw) float64 2.366 1.344 2.172 ... 1.461 1.925 2.231\n","    beta_0         (chain, draw, site) float64 64.48 65.05 64.66 ... 56.75 59.82\n","    beta_0j        (chain, draw, site) float64 65.46 66.38 65.65 ... 57.24 59.85\n","    mu             (chain, draw, obs_id) float64 46.97 46.97 ... 37.16 45.05\n","Attributes:\n","    created_at:                 2023-12-19T07:40:26.590625\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0\n","    sampling_time:              256.27764105796814\n","    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-90ec8c60-20c4-45b1-bbef-8f2de22aa45e' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-90ec8c60-20c4-45b1-bbef-8f2de22aa45e' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>site</span>: 5</li><li><span class='xr-has-index'>obs_id</span>: 415</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-015a10b0-acae-4b42-b5a4-cea44210978a' class='xr-section-summary-in' type='checkbox'  checked><label for='section-015a10b0-acae-4b42-b5a4-cea44210978a' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-c37673b3-2181-40b8-a175-980cfce589c2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c37673b3-2181-40b8-a175-980cfce589c2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-306f02f5-0b78-4178-aa62-6cc4312f519d' class='xr-var-data-in' type='checkbox'><label for='data-306f02f5-0b78-4178-aa62-6cc4312f519d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-e5d16291-a73d-4fd2-98a2-35d215854b32' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e5d16291-a73d-4fd2-98a2-35d215854b32' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6fc4b967-3e13-4843-8c10-f45c7d3429fb' class='xr-var-data-in' type='checkbox'><label for='data-6fc4b967-3e13-4843-8c10-f45c7d3429fb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>site</span></div><div class='xr-var-dims'>(site)</div><div class='xr-var-dtype'>&lt;U11</div><div class='xr-var-preview xr-preview'>&#x27;Kassel&#x27; &#x27;Portugal&#x27; ... &#x27;UCSB&#x27;</div><input id='attrs-b3575a9e-31bb-4679-8670-6dcd0e9acb6a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b3575a9e-31bb-4679-8670-6dcd0e9acb6a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-62cc382f-2f88-46e0-99e4-e648bf5d577f' class='xr-var-data-in' type='checkbox'><label for='data-62cc382f-2f88-46e0-99e4-e648bf5d577f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;Kassel&#x27;, &#x27;Portugal&#x27;, &#x27;Southampton&#x27;, &#x27;Tsinghua&#x27;, &#x27;UCSB&#x27;], dtype=&#x27;&lt;U11&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 410 411 412 413 414</div><input id='attrs-2a36bc03-c055-4d5b-b63a-14fffbf25c97' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2a36bc03-c055-4d5b-b63a-14fffbf25c97' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0dd1872d-7ad4-46d5-a994-7045893c08b1' class='xr-var-data-in' type='checkbox'><label for='data-0dd1872d-7ad4-46d5-a994-7045893c08b1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 412, 413, 414])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-35a8dbfd-1c98-4b81-8442-4e1937602f1e' class='xr-section-summary-in' type='checkbox'  checked><label for='section-35a8dbfd-1c98-4b81-8442-4e1937602f1e' class='xr-section-summary' >Data variables: <span>(9)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>gamma_0</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>63.08 64.02 62.87 ... 64.81 64.98</div><input id='attrs-d3ba5c8a-7919-424e-a992-9b9bb624ead2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d3ba5c8a-7919-424e-a992-9b9bb624ead2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-45bf18a9-89b9-49de-9189-01093d20c081' class='xr-var-data-in' type='checkbox'><label for='data-45bf18a9-89b9-49de-9189-01093d20c081' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[63.08331798, 64.016777  , 62.8737435 , ..., 63.18596001,\n","        51.03129278, 45.41568589],\n","       [68.35976139, 63.02760568, 61.99237507, ..., 63.13850113,\n","        62.49430989, 62.52506427],\n","       [59.22804881, 63.68177177, 72.82525717, ..., 59.88605688,\n","        75.02455835, 78.34348004],\n","       [60.28673153, 75.78051946, 57.11756312, ..., 65.61670147,\n","        64.807926  , 64.97680095]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>gamma_1</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.07942 -0.1445 ... -0.2493 -0.2717</div><input id='attrs-b6d2d9c5-627e-4d4d-87c3-0aae335eef88' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b6d2d9c5-627e-4d4d-87c3-0aae335eef88' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-18d93408-47b0-457b-afd2-6817027b12c2' class='xr-var-data-in' type='checkbox'><label for='data-18d93408-47b0-457b-afd2-6817027b12c2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.0794183 , -0.14451577, -0.1336688 , ...,  0.27515308,\n","         0.5671276 ,  0.59903608],\n","       [-0.12832859, -0.07273417, -0.06871726, ...,  0.09478631,\n","         0.05006437, -0.01642508],\n","       [ 0.21716077, -0.04007803, -0.33234325, ...,  0.144758  ,\n","        -0.4401899 , -0.59650098],\n","       [ 0.12708888, -0.33149523,  0.12398584, ..., -0.269169  ,\n","        -0.24932167, -0.27167297]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.6163 -0.5111 ... -0.4943 -0.4932</div><input id='attrs-609674df-d33b-479e-8c47-9f463444b297' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-609674df-d33b-479e-8c47-9f463444b297' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f67abfc2-ee94-47df-a33c-8a0e8a74277b' class='xr-var-data-in' type='checkbox'><label for='data-f67abfc2-ee94-47df-a33c-8a0e8a74277b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.61627888, -0.51112907, -0.50114815, ..., -0.66571404,\n","        -0.51991234, -0.47487629],\n","       [-0.62429153, -0.52639349, -0.51046139, ..., -0.6849237 ,\n","        -0.60495087, -0.54933442],\n","       [-0.59873699, -0.5391256 , -0.60567711, ..., -0.58785737,\n","        -0.54150115, -0.55125474],\n","       [-0.57214396, -0.61263873, -0.50121417, ..., -0.48919592,\n","        -0.49428195, -0.49318167]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_0_offset</span></div><div class='xr-var-dims'>(chain, draw, site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.4122 0.5593 ... 0.2221 0.01484</div><input id='attrs-87598f0e-e42a-42e1-b527-e042d6b9f34d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-87598f0e-e42a-42e1-b527-e042d6b9f34d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d9258dd3-4f41-4e17-9f63-1c0fa01c346b' class='xr-var-data-in' type='checkbox'><label for='data-d9258dd3-4f41-4e17-9f63-1c0fa01c346b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[ 0.41219196,  0.55931089,  0.41879539, -0.69445067,\n","         -0.03688442],\n","        [ 0.24766617,  2.7273664 , -1.09836814,  0.24484601,\n","         -0.20710543],\n","        [ 0.92915235,  2.64087714, -1.28089951,  0.68484336,\n","         -0.50381324],\n","        ...,\n","        [ 0.02504959,  0.2277436 , -0.31343269, -2.554108  ,\n","         -0.89565149],\n","        [ 0.46308153,  0.74040903, -0.60792342, -1.67175926,\n","         -0.27193184],\n","        [ 1.9644582 ,  0.39041045,  0.59394429, -2.23185613,\n","          0.39783056]],\n","\n","       [[ 0.01203408,  0.34772317, -0.49401117,  0.28342421,\n","         -0.92636085],\n","        [-0.25748353,  0.49952708,  0.64985608, -1.19027673,\n","         -0.69413699],\n","        [ 0.13220011,  0.32527578,  0.91379841, -0.04155881,\n","         -0.37197086],\n","...\n","        [ 2.2375393 ,  2.01382186, -0.82293824, -0.28351057,\n","          1.11837424],\n","        [-1.80598055,  1.10428265, -0.08032715, -0.3799152 ,\n","         -2.14867153],\n","        [-1.56653612,  0.57260811, -2.79414862,  0.59080191,\n","         -1.9801378 ]],\n","\n","       [[ 0.8930646 ,  1.77634739, -0.14621254, -1.37098554,\n","         -0.44416586],\n","        [-1.29088336, -0.33010769, -1.87189644, -0.37376945,\n","         -1.74214342],\n","        [ 1.9115495 ,  2.47789257,  1.95060488, -0.94878501,\n","          0.59363295],\n","        ...,\n","        [ 0.43293827,  3.20338196, -0.33462113,  0.49540229,\n","         -0.69736588],\n","        [-0.02659798,  2.79631429, -0.52965522,  1.44616174,\n","         -0.90358324],\n","        [ 0.69892254,  1.96142147, -0.53112884,  0.22213218,\n","          0.0148423 ]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>sigma_y</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>6.19 6.356 6.418 ... 6.681 6.657</div><input id='attrs-f4527cb3-cf6e-4e59-bf4d-3436481a9651' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f4527cb3-cf6e-4e59-bf4d-3436481a9651' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f5b775a7-eaa0-4e49-97c9-51d6b07be0fb' class='xr-var-data-in' type='checkbox'><label for='data-f5b775a7-eaa0-4e49-97c9-51d6b07be0fb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[6.19047447, 6.35560749, 6.41768992, ..., 6.34219204, 6.62862948,\n","        6.68630767],\n","       [6.36644468, 6.59113729, 6.70360812, ..., 6.39387012, 6.46221825,\n","        6.31952542],\n","       [6.38887355, 6.76475012, 6.3735009 , ..., 6.1502261 , 6.58544744,\n","        6.32247658],\n","       [6.81885276, 6.10744744, 6.56110838, ..., 6.55812338, 6.68083615,\n","        6.65737106]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>sigma_0</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.366 1.344 2.172 ... 1.925 2.231</div><input id='attrs-a100d7b1-edc4-4d44-b62a-309ef83fd872' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a100d7b1-edc4-4d44-b62a-309ef83fd872' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-411595f8-1c29-4d3b-b534-a901cb1fe373' class='xr-var-data-in' type='checkbox'><label for='data-411595f8-1c29-4d3b-b534-a901cb1fe373' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[2.36579473, 1.34445299, 2.17165452, ..., 1.99841002, 4.82718094,\n","        1.76524507],\n","       [0.23276803, 0.40799324, 0.52978177, ..., 3.05642554, 1.38037784,\n","        0.24292845],\n","       [2.85406293, 1.2051262 , 1.28377728, ..., 1.32649107, 2.64873677,\n","        2.52754522],\n","       [1.17598374, 3.04056164, 1.2954629 , ..., 1.46106343, 1.92530629,\n","        2.23109419]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_0</span></div><div class='xr-var-dims'>(chain, draw, site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>64.48 65.05 64.66 ... 56.75 59.82</div><input id='attrs-ac23da9e-8216-48b8-8c22-1b19f4f55ed5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ac23da9e-8216-48b8-8c22-1b19f4f55ed5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-75161319-b065-410f-b20e-659fe7e44e44' class='xr-var-data-in' type='checkbox'><label for='data-75161319-b065-410f-b20e-659fe7e44e44' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[64.48108011, 65.05289188, 64.6637422 , 65.48969255,\n","         64.59226573],\n","        [61.47329953, 60.43278602, 61.14091327, 59.63794931,\n","         61.27097746],\n","        [60.52117256, 59.55875717, 60.21373431, 58.82357875,\n","         60.33403623],\n","        ...,\n","        [68.02865422, 70.0097564 , 68.66150631, 71.52309834,\n","         68.41386854],\n","        [61.01273853, 65.09605725, 62.31713201, 68.21525905,\n","         61.80671717],\n","        [55.95872099, 60.2717808 , 57.33650398, 63.56647926,\n","         56.7973715 ]],\n","\n","       [[66.10117821, 65.17721237, 65.80602246, 64.47140512,\n","         65.92151819],\n","        [61.74748424, 61.2237982 , 61.58019565, 60.82376025,\n","         61.6456564 ],\n","        [60.78295122, 60.28818691, 60.62490151, 59.91024196,\n","         60.68674705],\n","...\n","        [62.43379766, 63.47605525, 62.76674106, 64.27222424,\n","         62.63645886],\n","        [67.27721607, 64.10784877, 66.2647793 , 61.68680431,\n","         66.66095021],\n","        [67.8450628 , 63.55025574, 66.47311054, 60.26950036,\n","         67.00996143]],\n","\n","       [[62.52349578, 63.4385357 , 62.8158002 , 64.13752453,\n","         62.70142021],\n","        [69.94620341, 67.55943775, 69.18376438, 65.73621398,\n","         69.48211008],\n","        [59.29971397, 60.19241204, 59.58488141, 60.87433418,\n","         59.47329415],\n","        ...,\n","        [60.87932706, 58.94131025, 60.26023835, 57.46088074,\n","         60.50249045],\n","        [60.41986456, 58.62474852, 59.84642472, 57.25347932,\n","         60.07081422],\n","        [60.19535674, 58.23931138, 59.57050892, 56.74511007,\n","         59.81501459]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_0j</span></div><div class='xr-var-dims'>(chain, draw, site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>65.46 66.38 65.65 ... 57.24 59.85</div><input id='attrs-2d3c4c29-2613-4646-942e-07a7e8731511' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2d3c4c29-2613-4646-942e-07a7e8731511' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-adfbe205-34b5-4d56-9a5c-63d08e3dca26' class='xr-var-data-in' type='checkbox'><label for='data-adfbe205-34b5-4d56-9a5c-63d08e3dca26' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[65.45624167, 66.37610664, 65.65452613, 63.8467648 ,\n","         64.50500476],\n","        [61.80627505, 64.09960194, 59.66420894, 59.96713326,\n","         60.99253394],\n","        [62.53897046, 65.29382995, 57.4320631 , 60.31082194,\n","         59.23992792],\n","        ...,\n","        [68.07871357, 70.46488149, 68.03513927, 66.41894332,\n","         66.62398961],\n","        [63.24811688, 68.6701456 , 59.38257567, 60.14537463,\n","         60.49405297],\n","        [59.42647113, 60.96095093, 58.38496122, 59.62670624,\n","         57.49963994]],\n","\n","       [[66.10397936, 65.2581512 , 65.69103245, 64.53737722,\n","         65.705891  ],\n","        [61.64243271, 61.42760187, 61.84533253, 60.3381354 ,\n","         61.3624532 ],\n","        [60.85298842, 60.46051209, 61.10901525, 59.88822486,\n","         60.48968367],\n","...\n","        [65.40187357, 66.14737197, 61.67512083, 63.89615001,\n","         64.1199723 ],\n","        [62.49364897, 67.03280283, 66.05201382, 60.68050894,\n","         60.96968491],\n","        [63.88557193, 64.99754863, 59.41077355, 61.76277889,\n","         62.00507358]],\n","\n","       [[63.57372523, 65.52749133, 62.64385663, 62.52526783,\n","         62.17908837],\n","        [66.02119299, 66.55572497, 63.49214786, 64.59974494,\n","         64.18501563],\n","        [61.77605542, 63.40242993, 62.11181765, 59.6452184 ,\n","         60.2423236 ],\n","        ...,\n","        [61.51187734, 63.6216545 , 59.77133566, 58.18469492,\n","         59.48359467],\n","        [60.3686553 , 64.00851001, 58.82667619, 60.03778361,\n","         58.33113973],\n","        [61.75471876, 62.61542743, 58.38551045, 57.24070788,\n","         59.84812915]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>mu</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>46.97 46.97 46.35 ... 37.16 45.05</div><input id='attrs-b8a31773-5510-493a-ad5a-2a2d2db4679c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b8a31773-5510-493a-ad5a-2a2d2db4679c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4e6691e8-04ac-47a4-bcba-4da014140c9b' class='xr-var-data-in' type='checkbox'><label for='data-4e6691e8-04ac-47a4-bcba-4da014140c9b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[46.96787515, 46.96787515, 46.35159627, ..., 47.8654749 ,\n","         36.1561761 , 46.01663824],\n","        [46.47240304, 46.47240304, 45.96127398, ..., 47.19204913,\n","         37.48059686, 45.65866193],\n","        [47.50452601, 47.50452601, 47.00337786, ..., 45.70892792,\n","         36.1871131 , 44.20548347],\n","        ...,\n","        [48.10729223, 48.10729223, 47.44157819, ..., 48.64971041,\n","         36.00114357, 46.65256828],\n","        [47.65074666, 47.65074666, 47.13083432, ..., 46.45641977,\n","         36.57808529, 44.89668274],\n","        [45.18018257, 45.18018257, 44.70530629, ..., 44.67798023,\n","         35.65533081, 43.25335138]],\n","\n","       [[47.37523354, 47.37523354, 46.75094201, ..., 48.85001976,\n","         36.98848074, 46.97714518],\n","        [45.85062803, 45.85062803, 45.32423454, ..., 47.14982899,\n","         37.1483527 , 45.57064853],\n","        [45.5391466 , 45.5391466 , 45.02868521, ..., 46.70722603,\n","         37.00845954, 45.17584185],\n","...\n","        [47.76615253, 47.76615253, 47.17829516, ..., 48.24782336,\n","         37.07853337, 46.48425126],\n","        [46.24861457, 46.24861457, 45.70711343, ..., 46.34915396,\n","         36.06063218, 44.72465052],\n","        [47.34792967, 47.34792967, 46.79667493, ..., 47.12119555,\n","         36.64735546, 45.46743133]],\n","\n","       [[46.40940651, 46.40940651, 45.83726255, ..., 46.73120153,\n","         35.86046635, 45.01476966],\n","        [47.64203111, 47.64203111, 47.02939238, ..., 47.64376994,\n","         36.00363409, 45.80585376],\n","        [46.73963019, 46.73963019, 46.23841601, ..., 46.7095409 ,\n","         37.18647159, 45.20589838],\n","        ...,\n","        [46.83599974, 46.83599974, 46.34680382, ..., 46.27530484,\n","         36.98058236, 44.80771708],\n","        [45.5401967 , 45.5401967 , 45.04591475, ..., 44.985527  ,\n","         35.59416989, 43.50268114],\n","        [46.95926872, 46.95926872, 46.46608705, ..., 46.53222411,\n","         37.16177241, 45.05267911]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-30ff1467-2dfa-40f2-928c-bf371b9a1c24' class='xr-section-summary-in' type='checkbox'  checked><label for='section-30ff1467-2dfa-40f2-928c-bf371b9a1c24' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:40:26.590625</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>256.27764105796814</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_sample_statsd2f26377-ffa6-4b30-9f38-22c22b065305\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_sample_statsd2f26377-ffa6-4b30-9f38-22c22b065305\" class = \"xr-section-summary\">sample_stats</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:                (chain: 4, draw: 5000)\n","Coordinates:\n","  * chain                  (chain) int64 0 1 2 3\n","  * draw                   (draw) int64 0 1 2 3 4 5 ... 4995 4996 4997 4998 4999\n","Data variables: (12/17)\n","    step_size_bar          (chain, draw) float64 0.02196 0.02196 ... 0.01949\n","    perf_counter_start     (chain, draw) float64 2.169e+03 ... 2.369e+03\n","    largest_eigval         (chain, draw) float64 nan nan nan nan ... nan nan nan\n","    lp                     (chain, draw) float64 -1.382e+03 ... -1.391e+03\n","    max_energy_error       (chain, draw) float64 -0.02156 -0.03431 ... 0.1272\n","    diverging              (chain, draw) bool False False False ... False False\n","    ...                     ...\n","    energy                 (chain, draw) float64 1.387e+03 ... 1.397e+03\n","    perf_counter_diff      (chain, draw) float64 0.02235 0.04285 ... 0.03637\n","    n_steps                (chain, draw) float64 127.0 255.0 ... 255.0 223.0\n","    process_time_diff      (chain, draw) float64 0.02235 0.04285 ... 0.03637\n","    step_size              (chain, draw) float64 0.02006 0.02006 ... 0.01927\n","    reached_max_treedepth  (chain, draw) bool False False False ... False False\n","Attributes:\n","    created_at:                 2023-12-19T07:40:26.629749\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0\n","    sampling_time:              256.27764105796814\n","    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-e27a506c-151e-4937-a537-d6e769e0f296' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-e27a506c-151e-4937-a537-d6e769e0f296' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-a5e98746-1357-4ff3-b4e0-08ab32d873aa' class='xr-section-summary-in' type='checkbox'  checked><label for='section-a5e98746-1357-4ff3-b4e0-08ab32d873aa' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-23acacf7-baeb-43fa-9248-e69e4e860463' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-23acacf7-baeb-43fa-9248-e69e4e860463' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-224698bc-c62c-4146-981a-9b12a81b6c1d' class='xr-var-data-in' type='checkbox'><label for='data-224698bc-c62c-4146-981a-9b12a81b6c1d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-ba3b9448-1cbe-490d-aa81-bb54fd065252' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ba3b9448-1cbe-490d-aa81-bb54fd065252' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4af91059-c2fe-4246-88a4-f14fc01574d0' class='xr-var-data-in' type='checkbox'><label for='data-4af91059-c2fe-4246-88a4-f14fc01574d0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-d8cf09f0-71b9-4aec-815f-223fb4c7dfe1' class='xr-section-summary-in' type='checkbox'  ><label for='section-d8cf09f0-71b9-4aec-815f-223fb4c7dfe1' class='xr-section-summary' >Data variables: <span>(17)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>step_size_bar</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.02196 0.02196 ... 0.01949 0.01949</div><input id='attrs-d86fd185-d8d6-4074-8d3d-58c0dda04bd0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d86fd185-d8d6-4074-8d3d-58c0dda04bd0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9b1e0dfe-6db5-46cd-ab7e-eddfa28176f2' class='xr-var-data-in' type='checkbox'><label for='data-9b1e0dfe-6db5-46cd-ab7e-eddfa28176f2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.02195547, 0.02195547, 0.02195547, ..., 0.02195547, 0.02195547,\n","        0.02195547],\n","       [0.01978802, 0.01978802, 0.01978802, ..., 0.01978802, 0.01978802,\n","        0.01978802],\n","       [0.01950971, 0.01950971, 0.01950971, ..., 0.01950971, 0.01950971,\n","        0.01950971],\n","       [0.01949272, 0.01949272, 0.01949272, ..., 0.01949272, 0.01949272,\n","        0.01949272]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_start</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.169e+03 2.169e+03 ... 2.369e+03</div><input id='attrs-22b0df10-1d71-4394-bc28-ae5297ecc0b0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-22b0df10-1d71-4394-bc28-ae5297ecc0b0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5e30616e-5dce-45ab-b03f-50835ccd390a' class='xr-var-data-in' type='checkbox'><label for='data-5e30616e-5dce-45ab-b03f-50835ccd390a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[2169.31217062, 2169.33469649, 2169.37771045, ..., 2332.33014442,\n","        2332.35699888, 2332.41414911],\n","       [2172.44317071, 2172.46447911, 2172.52117216, ..., 2361.12008752,\n","        2361.14116647, 2361.1624914 ],\n","       [2175.40479596, 2175.47930658, 2175.53173919, ..., 2382.29713423,\n","        2382.33974687, 2382.4145382 ],\n","       [2173.24122396, 2173.28310037, 2173.34116746, ..., 2368.72903848,\n","        2368.77029144, 2368.81224461]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>largest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-9d55c630-6ba6-4ac5-85bd-ee55daa0a398' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9d55c630-6ba6-4ac5-85bd-ee55daa0a398' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ff531f86-734b-4b5c-9926-bc87f25a6bbd' class='xr-var-data-in' type='checkbox'><label for='data-ff531f86-734b-4b5c-9926-bc87f25a6bbd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lp</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-1.382e+03 ... -1.391e+03</div><input id='attrs-9542dcbb-7e3a-4737-a5ac-01130c756e3c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9542dcbb-7e3a-4737-a5ac-01130c756e3c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6b29c894-8721-40cf-a350-0cb523690303' class='xr-var-data-in' type='checkbox'><label for='data-6b29c894-8721-40cf-a350-0cb523690303' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-1382.00899028, -1383.666199  , -1387.14409337, ...,\n","        -1384.50095677, -1385.84248367, -1391.36865075],\n","       [-1386.11605431, -1386.05422589, -1386.60074741, ...,\n","        -1385.17749126, -1385.45966724, -1387.00340883],\n","       [-1383.70116942, -1384.98978661, -1389.23194122, ...,\n","        -1388.29807802, -1386.00074695, -1387.33671892],\n","       [-1383.93017748, -1386.92616188, -1387.95045299, ...,\n","        -1386.76600794, -1387.93365283, -1391.01956226]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>max_energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.02156 -0.03431 ... 0.1272</div><input id='attrs-33ec336d-0096-4345-b89c-5dc6d338163a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-33ec336d-0096-4345-b89c-5dc6d338163a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7102a320-881b-4754-a980-cc8a286bfb55' class='xr-var-data-in' type='checkbox'><label for='data-7102a320-881b-4754-a980-cc8a286bfb55' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.02155971, -0.03430971,  0.12848523, ..., -0.03214453,\n","        -0.07103032, -0.07323018],\n","       [ 0.0365782 , -0.02932484,  0.03581751, ..., -0.09943551,\n","         0.09984561, -0.07894597],\n","       [-0.03500452,  0.06966965, -0.04220032, ..., -0.14548096,\n","        -0.17051641, -0.01542561],\n","       [ 0.02666551,  0.02666736,  0.02578314, ..., -0.01078183,\n","        -0.01439382,  0.12719184]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>diverging</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-3edd3ca4-723a-4fd8-b7b2-3f917569fd17' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3edd3ca4-723a-4fd8-b7b2-3f917569fd17' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-09b0cfef-62b6-4421-b184-55fc5344186a' class='xr-var-data-in' type='checkbox'><label for='data-09b0cfef-62b6-4421-b184-55fc5344186a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>index_in_trajectory</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>-67 -80 20 -217 ... -165 125 30 38</div><input id='attrs-49441d4d-c1ea-42bb-9dfc-1b0a81b18dbc' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-49441d4d-c1ea-42bb-9dfc-1b0a81b18dbc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-48c486dd-f219-4ccf-b8b3-7e2bf06e4d1c' class='xr-var-data-in' type='checkbox'><label for='data-48c486dd-f219-4ccf-b8b3-7e2bf06e4d1c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ -67,  -80,   20, ...,  -76,  -86,   65],\n","       [ 101, -143,   42, ...,   25,  -57, -173],\n","       [  23,  -69,   97, ...,  160,  171,   89],\n","       [ -77,  108, -183, ...,  125,   30,   38]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>acceptance_rate</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.9963 0.9999 ... 0.9996 0.9497</div><input id='attrs-70c5e0bf-cfb4-47d0-bf04-5c0963382f03' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-70c5e0bf-cfb4-47d0-bf04-5c0963382f03' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6cb5abd9-e6b0-4c1c-a4ac-8e125c1f17f6' class='xr-var-data-in' type='checkbox'><label for='data-6cb5abd9-e6b0-4c1c-a4ac-8e125c1f17f6' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.99630361, 0.99994038, 0.94948817, ..., 0.99803153, 0.99647519,\n","        0.99416948],\n","       [0.98261945, 0.99471575, 0.99065754, ..., 0.98192119, 0.94802981,\n","        0.99741792],\n","       [0.99508562, 0.97069826, 0.99914143, ..., 0.99545896, 0.9999575 ,\n","        0.99614905],\n","       [0.98996201, 0.99159175, 0.99225299, ..., 0.99993795, 0.9996488 ,\n","        0.94970751]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smallest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-f149ece9-3f1c-4d79-ace3-530dc3e2aacf' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f149ece9-3f1c-4d79-ace3-530dc3e2aacf' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1a1bac0b-04a5-486a-adde-fa961357c8ea' class='xr-var-data-in' type='checkbox'><label for='data-1a1bac0b-04a5-486a-adde-fa961357c8ea' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.01055 0.0004475 ... 0.1099</div><input id='attrs-70469546-6168-4530-930b-070e807d0bed' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-70469546-6168-4530-930b-070e807d0bed' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bdff7f4f-3ac7-4557-a382-fd34f2192b7e' class='xr-var-data-in' type='checkbox'><label for='data-bdff7f4f-3ac7-4557-a382-fd34f2192b7e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.01054626,  0.00044745,  0.12287236, ...,  0.00889191,\n","         0.00404714,  0.00790215],\n","       [ 0.00069105,  0.00961437,  0.002173  , ..., -0.07553162,\n","         0.06943661, -0.03638123],\n","       [-0.02229991,  0.0360954 , -0.00914512, ...,  0.02533711,\n","        -0.13567215,  0.00454359],\n","       [ 0.00760937,  0.00698052,  0.0130238 , ..., -0.00248526,\n","        -0.00243342,  0.10994879]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tree_depth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>7 8 6 8 8 7 7 8 ... 7 6 6 8 8 8 8 8</div><input id='attrs-ace0c97d-56ee-4fd2-a7c3-9c9e6444d84c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ace0c97d-56ee-4fd2-a7c3-9c9e6444d84c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-44013aaf-db00-4cdf-bcc7-741435ab36a7' class='xr-var-data-in' type='checkbox'><label for='data-44013aaf-db00-4cdf-bcc7-741435ab36a7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[7, 8, 6, ..., 7, 8, 7],\n","       [7, 8, 7, ..., 7, 7, 8],\n","       [9, 8, 8, ..., 8, 9, 7],\n","       [8, 8, 8, ..., 8, 8, 8]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.387e+03 1.388e+03 ... 1.397e+03</div><input id='attrs-d8acd6a0-5c4e-44b4-972c-909c17db9a09' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d8acd6a0-5c4e-44b4-972c-909c17db9a09' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-dba9158b-9e4d-4ecb-85e9-2fc38486575f' class='xr-var-data-in' type='checkbox'><label for='data-dba9158b-9e4d-4ecb-85e9-2fc38486575f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1387.4630351 , 1388.15402024, 1390.0307726 , ..., 1390.19468614,\n","        1391.97482446, 1394.48904895],\n","       [1394.73729536, 1389.97455904, 1388.77720551, ..., 1393.50502826,\n","        1390.96121873, 1389.96338467],\n","       [1388.54376542, 1388.51275385, 1393.86623193, ..., 1393.2329524 ,\n","        1391.77311026, 1390.00166251],\n","       [1386.97335209, 1394.74075914, 1390.80368463, ..., 1390.18680956,\n","        1390.32595414, 1396.73346757]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.02235 0.04285 ... 0.04168 0.03637</div><input id='attrs-8da23e8d-00c6-4a89-8d74-655725301de4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8da23e8d-00c6-4a89-8d74-655725301de4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0b4b9278-2120-499d-be65-750501651221' class='xr-var-data-in' type='checkbox'><label for='data-0b4b9278-2120-499d-be65-750501651221' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.0223465 , 0.04284637, 0.02277369, ..., 0.02621938, 0.05661157,\n","        0.02493912],\n","       [0.02114511, 0.05648065, 0.0211123 , ..., 0.02088298, 0.02114331,\n","        0.04204236],\n","       [0.07433453, 0.05224839, 0.05367647, ..., 0.04236067, 0.07452913,\n","        0.02106834],\n","       [0.04169171, 0.05785401, 0.04276265, ..., 0.04102655, 0.04167846,\n","        0.03637069]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>n_steps</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>127.0 255.0 63.0 ... 255.0 223.0</div><input id='attrs-72da8ef3-626f-45a5-b284-7e05830954a3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-72da8ef3-626f-45a5-b284-7e05830954a3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a7e98297-3785-4fff-bcfc-bb97fa92161e' class='xr-var-data-in' type='checkbox'><label for='data-a7e98297-3785-4fff-bcfc-bb97fa92161e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[127., 255.,  63., ..., 127., 255., 127.],\n","       [127., 255., 127., ..., 127., 127., 255.],\n","       [447., 255., 255., ..., 255., 447., 127.],\n","       [255., 255., 255., ..., 255., 255., 223.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>process_time_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.02235 0.04285 ... 0.04168 0.03637</div><input id='attrs-2b082144-377a-4bee-a48a-bd49f1393bde' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2b082144-377a-4bee-a48a-bd49f1393bde' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2b75ffad-aa43-486b-8a8b-6579abb4bb1c' class='xr-var-data-in' type='checkbox'><label for='data-2b75ffad-aa43-486b-8a8b-6579abb4bb1c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.02234615, 0.04284653, 0.0107747 , ..., 0.02621937, 0.0466125 ,\n","        0.02493906],\n","       [0.02114524, 0.04548132, 0.02111261, ..., 0.02088295, 0.0211436 ,\n","        0.04204302],\n","       [0.07433389, 0.0432519 , 0.0536767 , ..., 0.04236187, 0.0745308 ,\n","        0.02106025],\n","       [0.04169186, 0.0458566 , 0.04276225, ..., 0.04101095, 0.04167932,\n","        0.03637095]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.02006 0.02006 ... 0.01927 0.01927</div><input id='attrs-4f834c6d-fb39-460d-ad52-4fb51baef98a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4f834c6d-fb39-460d-ad52-4fb51baef98a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4ad06c9b-1e8a-4db1-b805-41e84ce21a39' class='xr-var-data-in' type='checkbox'><label for='data-4ad06c9b-1e8a-4db1-b805-41e84ce21a39' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.02006086, 0.02006086, 0.02006086, ..., 0.02006086, 0.02006086,\n","        0.02006086],\n","       [0.02025932, 0.02025932, 0.02025932, ..., 0.02025932, 0.02025932,\n","        0.02025932],\n","       [0.02069257, 0.02069257, 0.02069257, ..., 0.02069257, 0.02069257,\n","        0.02069257],\n","       [0.01926508, 0.01926508, 0.01926508, ..., 0.01926508, 0.01926508,\n","        0.01926508]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>reached_max_treedepth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-c0284918-9215-4fb5-ba17-875866d601f4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c0284918-9215-4fb5-ba17-875866d601f4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5944331e-523d-48ef-8232-34872d565bca' class='xr-var-data-in' type='checkbox'><label for='data-5944331e-523d-48ef-8232-34872d565bca' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-476f54bd-4f9c-4711-abe1-a382420caefc' class='xr-section-summary-in' type='checkbox'  checked><label for='section-476f54bd-4f9c-4711-abe1-a382420caefc' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:40:26.629749</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>256.27764105796814</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_observed_data1ae2eb6d-db25-4f0c-ac23-f39bc74383aa\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_observed_data1ae2eb6d-db25-4f0c-ac23-f39bc74383aa\" class = \"xr-section-summary\">observed_data</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:  (obs_id: 415)\n","Coordinates:\n","  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 407 408 409 410 411 412 413 414\n","Data variables:\n","    y_est    (obs_id) float64 47.0 44.0 47.0 37.0 33.0 ... 32.0 40.0 31.0 48.0\n","Attributes:\n","    created_at:                 2023-12-19T07:40:26.636949\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-389ffc14-7cd3-4a57-82ce-e7ed2aed32bb' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-389ffc14-7cd3-4a57-82ce-e7ed2aed32bb' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 415</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-b4be3b4c-9cc0-4b75-92f0-f2dd079d4642' class='xr-section-summary-in' type='checkbox'  checked><label for='section-b4be3b4c-9cc0-4b75-92f0-f2dd079d4642' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 410 411 412 413 414</div><input id='attrs-f75570de-581b-4e91-af6c-9348839bb436' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f75570de-581b-4e91-af6c-9348839bb436' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bb69a04d-ea34-46db-af0b-1556ca180deb' class='xr-var-data-in' type='checkbox'><label for='data-bb69a04d-ea34-46db-af0b-1556ca180deb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 412, 413, 414])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8f5bffbf-5f74-4ac5-8378-acd28380f612' class='xr-section-summary-in' type='checkbox'  checked><label for='section-8f5bffbf-5f74-4ac5-8378-acd28380f612' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>y_est</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>47.0 44.0 47.0 ... 40.0 31.0 48.0</div><input id='attrs-b5b884d1-6913-442d-a2d5-2f21345c3167' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b5b884d1-6913-442d-a2d5-2f21345c3167' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-02e56055-d203-4dea-af40-8e5eb335ec39' class='xr-var-data-in' type='checkbox'><label for='data-02e56055-d203-4dea-af40-8e5eb335ec39' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([47., 44., 47., 37., 33., 37., 37., 48., 38., 41., 35., 42., 33.,\n","       34., 49., 37., 36., 52., 36., 51., 45., 33., 37., 42., 51., 46.,\n","       36., 52., 48., 36., 52., 31., 50., 33., 40., 48., 21., 43., 28.,\n","       45., 45., 42., 42., 38., 44., 42., 37., 42., 33., 30., 60., 34.,\n","       44., 37., 19., 55., 39., 39., 42., 43., 41., 39., 42., 37., 55.,\n","       55., 46., 44., 44., 35., 41., 42., 49., 33., 38., 42., 26., 28.,\n","       59., 52., 35., 38., 31., 55., 31., 59., 41., 44., 47., 49., 41.,\n","       36., 44., 48., 42., 47., 39., 41., 52., 48., 38., 34., 24., 41.,\n","       49., 42., 53., 47., 40., 49., 35., 49., 52., 56., 57., 50., 55.,\n","       44., 37., 53., 38., 48., 43., 42., 36., 42., 42., 32., 31., 35.,\n","       45., 40., 49., 47., 40., 40., 46., 50., 43., 36., 35., 47., 50.,\n","       44., 34., 26., 42., 48., 41., 46., 43., 40., 52., 46., 41., 46.,\n","       40., 42., 41., 48., 49., 46., 35., 37., 45., 37., 36., 35., 45.,\n","       35., 40., 35., 49., 39., 38., 45., 40., 37., 36., 42., 32., 40.,\n","       45., 33., 45., 42., 40., 23., 32., 50., 44., 40., 36., 28., 51.,\n","       40., 33., 29., 37., 38., 38., 26., 40., 41., 43., 44., 38., 34.,\n","       46., 43., 42., 43., 40., 33., 44., 38., 40., 43., 31., 51., 50.,\n","       42., 41., 34., 38., 37., 42., 41., 27., 46., 33., 35., 48., 39.,\n","       41., 43., 31., 40., 38., 43., 38., 36., 41., 48., 44., 28., 36.,\n","       32., 42., 30., 40., 43., 36., 38., 25., 41., 35., 36., 45., 35.,\n","       36., 33., 42., 28., 43., 44., 38., 31., 33., 29., 43., 47., 42.,\n","       48., 27., 36., 31., 48., 34., 40., 32., 46., 34., 39., 36., 37.,\n","       39., 47., 44., 37., 40., 50., 35., 42., 24., 38., 41., 45., 35.,\n","       44., 46., 39., 52., 33., 35., 38., 39., 36., 42., 45., 37., 19.,\n","       27., 52., 49., 48., 28., 38., 53., 50., 41., 46., 42., 29., 20.,\n","       39., 32., 37., 37., 43., 32., 35., 44., 47., 32., 51., 37., 38.,\n","       36., 40., 58., 40., 39., 46., 27., 28., 42., 26., 56., 41., 55.,\n","       44., 30., 23., 40., 52., 44., 26., 49., 32., 36., 26., 40., 37.,\n","       34., 56., 33., 40., 51., 37., 38., 33., 45., 37., 32., 22., 31.,\n","       31., 44., 40., 34., 42., 28., 55., 26., 39., 36., 33., 34., 42.,\n","       44., 34., 35., 40., 43., 52., 21., 25., 39., 41., 42., 42., 55.,\n","       32., 38., 33., 48., 49., 30., 44., 36., 32., 40., 31., 48.])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-b9611bd7-e7d3-490f-8d25-46f134f79df0' class='xr-section-summary-in' type='checkbox'  checked><label for='section-b9611bd7-e7d3-490f-8d25-46f134f79df0' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:40:26.636949</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_constant_data755da747-3866-4940-a5f2-338d5ce57df1\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_constant_data755da747-3866-4940-a5f2-338d5ce57df1\" class = \"xr-section-summary\">constant_data</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:  (obs_id: 415, site: 5)\n","Coordinates:\n","  * obs_id   (obs_id) int64 0 1 2 3 4 5 6 7 ... 407 408 409 410 411 412 413 414\n","  * site     (site) &lt;U11 &#x27;Kassel&#x27; &#x27;Portugal&#x27; &#x27;Southampton&#x27; &#x27;Tsinghua&#x27; &#x27;UCSB&#x27;\n","Data variables:\n","    x        (obs_id) int32 30 30 31 47 50 42 37 33 ... 42 47 36 48 45 27 46 30\n","    u        (site) float64 17.6 24.8 19.9 30.3 19.0\n","Attributes:\n","    created_at:                 2023-12-19T07:40:26.638988\n","    arviz_version:              0.16.0\n","    inference_library:          pymc\n","    inference_library_version:  5.6.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-c7c78403-4dd8-4ae5-98ac-d54b4316cdb5' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-c7c78403-4dd8-4ae5-98ac-d54b4316cdb5' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 415</li><li><span class='xr-has-index'>site</span>: 5</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-3ed86a85-4549-4edd-ac74-2ead5895920e' class='xr-section-summary-in' type='checkbox'  checked><label for='section-3ed86a85-4549-4edd-ac74-2ead5895920e' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 410 411 412 413 414</div><input id='attrs-aab6adc4-1db3-4d89-b160-e01cb304db71' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-aab6adc4-1db3-4d89-b160-e01cb304db71' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e8f06d33-96aa-42a8-9720-1d6583d0a486' class='xr-var-data-in' type='checkbox'><label for='data-e8f06d33-96aa-42a8-9720-1d6583d0a486' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 412, 413, 414])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>site</span></div><div class='xr-var-dims'>(site)</div><div class='xr-var-dtype'>&lt;U11</div><div class='xr-var-preview xr-preview'>&#x27;Kassel&#x27; &#x27;Portugal&#x27; ... &#x27;UCSB&#x27;</div><input id='attrs-53bbac6b-eb72-4c1c-8ca8-0d42dcd5f1f2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-53bbac6b-eb72-4c1c-8ca8-0d42dcd5f1f2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e00730a1-3dab-41b8-9a8c-47262a7ef609' class='xr-var-data-in' type='checkbox'><label for='data-e00730a1-3dab-41b8-9a8c-47262a7ef609' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;Kassel&#x27;, &#x27;Portugal&#x27;, &#x27;Southampton&#x27;, &#x27;Tsinghua&#x27;, &#x27;UCSB&#x27;], dtype=&#x27;&lt;U11&#x27;)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-c5cdc5aa-6bc2-464f-a9ae-5a899cca937f' class='xr-section-summary-in' type='checkbox'  checked><label for='section-c5cdc5aa-6bc2-464f-a9ae-5a899cca937f' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>x</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>30 30 31 47 50 ... 48 45 27 46 30</div><input id='attrs-5b07755b-16a8-498f-8d6d-7d3abea915fe' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5b07755b-16a8-498f-8d6d-7d3abea915fe' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b1c95277-5891-497f-a271-6cf9d98de510' class='xr-var-data-in' type='checkbox'><label for='data-b1c95277-5891-497f-a271-6cf9d98de510' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([30, 30, 31, 47, 50, 42, 37, 33, 42, 40, 53, 34, 40, 40, 33, 42, 49,\n","       57, 44, 39, 39, 41, 42, 30, 39, 39, 43, 34, 27, 46, 43, 38, 29, 28,\n","       42, 38, 40, 27, 50, 28, 37, 32, 34, 42, 37, 36, 40, 36, 52, 46, 35,\n","       48, 48, 47, 47, 36, 39, 40, 40, 39, 49, 47, 40, 50, 37, 35, 45, 44,\n","       39, 47, 36, 34, 30, 41, 51, 43, 54, 43, 34, 35, 39, 36, 48, 32, 43,\n","       24, 33, 36, 39, 36, 38, 41, 37, 39, 37, 36, 41, 35, 39, 42, 44, 37,\n","       55, 37, 42, 39, 38, 34, 35, 39, 35, 34, 39, 31, 27, 34, 39, 36, 40,\n","       43, 45, 41, 47, 39, 45, 39, 39, 34, 42, 43, 37, 41, 42, 38, 43, 31,\n","       35, 45, 42, 41, 58, 47, 33, 40, 34, 45, 38, 31, 40, 37, 36, 37, 38,\n","       35, 34, 44, 44, 36, 36, 39, 40, 30, 47, 35, 48, 42, 42, 40, 35, 36,\n","       28, 47, 27, 49, 41, 37, 37, 41, 49, 54, 50, 36, 43, 35, 33, 40, 39,\n","       39, 46, 26, 49, 36, 42, 43, 33, 46, 46, 51, 43, 38, 44, 49, 26, 31,\n","       50, 47, 42, 46, 36, 40, 33, 33, 50, 43, 30, 36, 37, 30, 42, 39, 46,\n","       39, 28, 52, 26, 43, 38, 38, 46, 39, 44, 41, 44, 42, 30, 39, 45, 46,\n","       38, 36, 42, 39, 41, 37, 32, 49, 40, 42, 43, 48, 47, 35, 44, 35, 48,\n","       38, 45, 34, 30, 35, 45, 42, 32, 39, 38, 33, 35, 36, 36, 46, 43, 26,\n","       34, 37, 44, 41, 50, 22, 43, 41, 57, 43, 45, 39, 43, 41, 57, 35, 43,\n","       39, 38, 33, 55, 38, 46, 42, 48, 26, 40, 29, 36, 43, 32, 42, 42, 39,\n","       33, 39, 34, 35, 47, 53, 53, 33, 36, 37, 42, 33, 29, 40, 38, 48, 39,\n","       45, 52, 33, 37, 35, 46, 38, 48, 46, 32, 36, 53, 40, 44, 38, 35, 41,\n","       38, 45, 42, 28, 50, 53, 35, 60, 36, 52, 35, 48, 48, 32, 42, 39, 45,\n","       57, 39, 41, 45, 40, 46, 40, 50, 41, 41, 47, 31, 42, 42, 38, 42, 47,\n","       45, 54, 47, 53, 39, 52, 49, 41, 39, 24, 56, 41, 51, 35, 44, 39, 38,\n","       48, 45, 44, 45, 31, 43, 47, 55, 44, 36, 35, 36, 41, 39, 40, 39, 42,\n","       47, 36, 48, 45, 27, 46, 30], dtype=int32)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>u</span></div><div class='xr-var-dims'>(site)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>17.6 24.8 19.9 30.3 19.0</div><input id='attrs-11774a31-e30a-43f7-97e2-13368d6c7a91' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-11774a31-e30a-43f7-97e2-13368d6c7a91' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c9f4c2fb-2996-4bfc-8895-880501ee2e02' class='xr-var-data-in' type='checkbox'><label for='data-c9f4c2fb-2996-4bfc-8895-880501ee2e02' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([17.6, 24.8, 19.9, 30.3, 19. ])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-99f331a9-49a8-4277-886f-c04aa562a939' class='xr-section-summary-in' type='checkbox'  checked><label for='section-99f331a9-49a8-4277-886f-c04aa562a939' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:40:26.638988</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","              </ul>\n","            </div>\n","            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-sections.group-sections {\n","  grid-template-columns: auto;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt, dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n",".xr-wrap{width:700px!important;} </style>"],"text/plain":["Inference data with groups:\n","\t> posterior\n","\t> sample_stats\n","\t> observed_data\n","\t> constant_data"]},"execution_count":104,"metadata":{},"output_type":"execute_result"}],"source":["group_pred_trace"]},{"cell_type":"markdown","metadata":{"id":"69342FE036DF47BA8E77AB753A2FA840","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 后验预测回归线(站点平均气温的影响)  \n","\n","* 下面展示了组层面预测因子(夏季平均气温)与截距的关系"]},{"cell_type":"code","execution_count":105,"metadata":{"collapsed":false,"id":"D2B2F33F2A40480BAE8B910EF3624A62","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/E534BF8140F949DC896DDCC0F878E46C/s5wlblpwjy.png\">"],"text/plain":["<Figure size 640x480 with 1 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["# 提取每个站点的温度\n","u = group_pred_trace.constant_data.u\n","# 提取组层面截距与温度的关系，体现在beta_0: beta_0 = gamma_0 + gamma_1 * u\n","beta_0 = group_pred_trace.posterior.beta_0.mean(dim=(\"chain\",\"draw\")).values\n","#提取每个站点的截距\n","beta_0j = group_pred_trace.posterior.beta_0j.mean(dim=(\"chain\",\"draw\"))\n","temp_hdi = az.hdi(group_pred_trace.posterior.beta_0j)\n","# 绘制每个站点的截距均值\n","plt.scatter(u, beta_0j,\n","        color=\"black\",\n","        alpha=0.5,\n","        label=\"Mean site-intercept\")\n","#绘制截距与温度之间的关系\n","plt.plot(u, beta_0,\n","        color=\"red\",\n","        alpha=0.5,\n","        label=\"Mean intercept\")\n","#绘制每个站点截距95%HDI\n","az.plot_hdi(\n","        u, group_pred_trace.posterior.beta_0j,\n","        hdi_prob=0.95,\n","        fill_kwargs={\"alpha\": 0.1, \"color\": \"k\", \"label\": \"Mean intercept HPD\"}\n","        )\n","#生成横坐标名称\n","plt.xlabel('Site-level temparature', fontsize=12)\n","# 生成纵坐标名称\n","plt.ylabel('Intercept estimate', fontsize=12)\n","plt.legend(loc=\"upper right\")\n","\n","sns.despine()"]},{"cell_type":"markdown","metadata":{"id":"FD902F3CB484413BA64D4BA674B4E7C9","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["## Hierarchical logistic regression"]},{"cell_type":"markdown","metadata":{"id":"A5F639CDF0BD4FAF85C4AC4ADCFAF75F","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["> 在之前的课程中，除了正态回归模型，我们还介绍过logistic回归模型、泊松回归模型和负二项回归模型。这些模型同样可以和层级模型结合  \n","\n","* 在lec13中我们使用回避依恋分数来预测个体的恋爱情况，假设这一线性关系在不同文化中有不同的表现，我们也可以把站点信息考虑在内  \n","\n","* 对于因变量为离散变量的情况，我们需要使用广义线性模型(Generalized linear model，GLM)。  \n","\n","* 其特点为：  \n","\t- 分布簇 (dist)不再局限于正态分布，而是允许其他不同的分布，比如 $y \\sim Bernoulli(p)$  \n","\t- 需要 **链接函数$g()$** 将 $\\alpha + \\beta * x$  映射到 $p$所在的范围  \n","\n","| 一般线性模型 | 广义线性模型 |  \n","|---|---|  \n","| $y \\sim Normal(\\mu, \\sigma)$ | $y \\sim dist(p)$ |  \n","| $\\mu = \\alpha + \\beta *x$ | $p = g(z)$|  \n","|  | $z = \\alpha + \\beta *x$|  \n"]},{"cell_type":"code","execution_count":106,"metadata":{"collapsed":false,"id":"6C0BF720FD01483BA72AD1E9ED650AFE","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th></th>\n","      <th>age</th>\n","      <th>anxiety</th>\n","      <th>anxiety_r</th>\n","      <th>artgluctot</th>\n","      <th>attachhome</th>\n","      <th>attachphone</th>\n","      <th>AvgHumidity</th>\n","      <th>avgtemp</th>\n","      <th>avoidance</th>\n","      <th>avoidance_r</th>\n","      <th>...</th>\n","      <th>sex</th>\n","      <th>Site</th>\n","      <th>smoke</th>\n","      <th>socialdiversity</th>\n","      <th>socialembedded</th>\n","      <th>socTherm</th>\n","      <th>soliTherm</th>\n","      <th>stress</th>\n","      <th>site_idx</th>\n","      <th>obs_id</th>\n","    </tr>\n","    <tr>\n","      <th>Site</th>\n","      <th>obs_id</th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th rowspan=\"3\" valign=\"top\">Kassel</th>\n","      <th>103</th>\n","      <td>NaN</td>\n","      <td>3.166667</td>\n","      <td>0.039748</td>\n","      <td>0.0</td>\n","      <td>4.888889</td>\n","      <td>4.111111</td>\n","      <td>NaN</td>\n","      <td>35.810000</td>\n","      <td>3.055556</td>\n","      <td>0.249759</td>\n","      <td>...</td>\n","      <td>NaN</td>\n","      <td>Kassel</td>\n","      <td>NaN</td>\n","      <td>6</td>\n","      <td>4</td>\n","      <td>1.6</td>\n","      <td>3.875</td>\n","      <td>37</td>\n","      <td>0</td>\n","      <td>103</td>\n","    </tr>\n","    <tr>\n","      <th>104</th>\n","      <td>NaN</td>\n","      <td>0.000000</td>\n","      <td>-2.658639</td>\n","      <td>NaN</td>\n","      <td>4.333333</td>\n","      <td>3.000000</td>\n","      <td>NaN</td>\n","      <td>36.100000</td>\n","      <td>3.055556</td>\n","      <td>0.249759</td>\n","      <td>...</td>\n","      <td>NaN</td>\n","      <td>Kassel</td>\n","      <td>NaN</td>\n","      <td>3</td>\n","      <td>1</td>\n","      <td>3.2</td>\n","      <td>3.500</td>\n","      <td>42</td>\n","      <td>0</td>\n","      <td>104</td>\n","    </tr>\n","    <tr>\n","      <th>105</th>\n","      <td>NaN</td>\n","      <td>0.000000</td>\n","      <td>-2.658639</td>\n","      <td>NaN</td>\n","      <td>3.888889</td>\n","      <td>1.777778</td>\n","      <td>NaN</td>\n","      <td>36.300000</td>\n","      <td>2.111111</td>\n","      <td>-0.811715</td>\n","      <td>...</td>\n","      <td>NaN</td>\n","      <td>Kassel</td>\n","      <td>NaN</td>\n","      <td>0</td>\n","      <td>1</td>\n","      <td>3.4</td>\n","      <td>3.000</td>\n","      <td>39</td>\n","      <td>0</td>\n","      <td>105</td>\n","    </tr>\n","    <tr>\n","      <th rowspan=\"4\" valign=\"top\">Portugal</th>\n","      <th>123</th>\n","      <td>NaN</td>\n","      <td>0.000000</td>\n","      <td>-1.835996</td>\n","      <td>NaN</td>\n","      <td>5.000000</td>\n","      <td>3.000000</td>\n","      <td>NaN</td>\n","      <td>36.200000</td>\n","      <td>3.055556</td>\n","      <td>-0.178491</td>\n","      <td>...</td>\n","      <td>NaN</td>\n","      <td>Portugal</td>\n","      <td>NaN</td>\n","      <td>0</td>\n","      <td>1</td>\n","      <td>3.6</td>\n","      <td>3.875</td>\n","      <td>39</td>\n","      <td>1</td>\n","      <td>123</td>\n","    </tr>\n","    <tr>\n","      <th>124</th>\n","      <td>NaN</td>\n","      <td>3.388889</td>\n","      <td>0.631906</td>\n","      <td>1.0</td>\n","      <td>5.000000</td>\n","      <td>3.666667</td>\n","      <td>NaN</td>\n","      <td>36.400000</td>\n","      <td>4.000000</td>\n","      <td>0.901529</td>\n","      <td>...</td>\n","      <td>NaN</td>\n","      <td>Portugal</td>\n","      <td>NaN</td>\n","      <td>8</td>\n","      <td>3</td>\n","      <td>3.2</td>\n","      <td>4.000</td>\n","      <td>45</td>\n","      <td>1</td>\n","      <td>124</td>\n","    </tr>\n","    <tr>\n","      <th>125</th>\n","      <td>NaN</td>\n","      <td>0.000000</td>\n","      <td>-1.835996</td>\n","      <td>NaN</td>\n","      <td>3.555556</td>\n","      <td>3.000000</td>\n","      <td>74.0</td>\n","      <td>37.000000</td>\n","      <td>3.166667</td>\n","      <td>-0.051430</td>\n","      <td>...</td>\n","      <td>NaN</td>\n","      <td>Portugal</td>\n","      <td>NaN</td>\n","      <td>11</td>\n","      <td>5</td>\n","      <td>3.2</td>\n","      <td>3.500</td>\n","      <td>39</td>\n","      <td>1</td>\n","      <td>125</td>\n","    </tr>\n","    <tr>\n","      <th>126</th>\n","      <td>NaN</td>\n","      <td>0.000000</td>\n","      <td>-1.835996</td>\n","      <td>0.0</td>\n","      <td>3.777778</td>\n","      <td>3.000000</td>\n","      <td>NaN</td>\n","      <td>37.100000</td>\n","      <td>2.111111</td>\n","      <td>-1.258510</td>\n","      <td>...</td>\n","      <td>NaN</td>\n","      <td>Portugal</td>\n","      <td>NaN</td>\n","      <td>0</td>\n","      <td>1</td>\n","      <td>4.0</td>\n","      <td>4.250</td>\n","      <td>39</td>\n","      <td>1</td>\n","      <td>126</td>\n","    </tr>\n","    <tr>\n","      <th>UCSB</th>\n","      <th>408</th>\n","      <td>NaN</td>\n","      <td>3.611111</td>\n","      <td>0.143634</td>\n","      <td>0.0</td>\n","      <td>4.777778</td>\n","      <td>3.000000</td>\n","      <td>82.0</td>\n","      <td>35.777778</td>\n","      <td>3.055556</td>\n","      <td>-0.160921</td>\n","      <td>...</td>\n","      <td>NaN</td>\n","      <td>UCSB</td>\n","      <td>NaN</td>\n","      <td>6</td>\n","      <td>5</td>\n","      <td>3.8</td>\n","      <td>2.875</td>\n","      <td>47</td>\n","      <td>4</td>\n","      <td>408</td>\n","    </tr>\n","  </tbody>\n","</table>\n","<p>8 rows × 39 columns</p>\n","</div>"],"text/plain":["                 age   anxiety  anxiety_r  artgluctot  attachhome  \\\n","Site     obs_id                                                     \n","Kassel   103     NaN  3.166667   0.039748         0.0    4.888889   \n","         104     NaN  0.000000  -2.658639         NaN    4.333333   \n","         105     NaN  0.000000  -2.658639         NaN    3.888889   \n","Portugal 123     NaN  0.000000  -1.835996         NaN    5.000000   \n","         124     NaN  3.388889   0.631906         1.0    5.000000   \n","         125     NaN  0.000000  -1.835996         NaN    3.555556   \n","         126     NaN  0.000000  -1.835996         0.0    3.777778   \n","UCSB     408     NaN  3.611111   0.143634         0.0    4.777778   \n","\n","                 attachphone  AvgHumidity    avgtemp  avoidance  avoidance_r  \\\n","Site     obs_id                                                                \n","Kassel   103        4.111111          NaN  35.810000   3.055556     0.249759   \n","         104        3.000000          NaN  36.100000   3.055556     0.249759   \n","         105        1.777778          NaN  36.300000   2.111111    -0.811715   \n","Portugal 123        3.000000          NaN  36.200000   3.055556    -0.178491   \n","         124        3.666667          NaN  36.400000   4.000000     0.901529   \n","         125        3.000000         74.0  37.000000   3.166667    -0.051430   \n","         126        3.000000          NaN  37.100000   2.111111    -1.258510   \n","UCSB     408        3.000000         82.0  35.777778   3.055556    -0.160921   \n","\n","                 ...  sex      Site  smoke  socialdiversity  socialembedded  \\\n","Site     obs_id  ...                                                          \n","Kassel   103     ...  NaN    Kassel    NaN                6               4   \n","         104     ...  NaN    Kassel    NaN                3               1   \n","         105     ...  NaN    Kassel    NaN                0               1   \n","Portugal 123     ...  NaN  Portugal    NaN                0               1   \n","         124     ...  NaN  Portugal    NaN                8               3   \n","         125     ...  NaN  Portugal    NaN               11               5   \n","         126     ...  NaN  Portugal    NaN                0               1   \n","UCSB     408     ...  NaN      UCSB    NaN                6               5   \n","\n","                 socTherm  soliTherm  stress  site_idx  obs_id  \n","Site     obs_id                                                 \n","Kassel   103          1.6      3.875      37         0     103  \n","         104          3.2      3.500      42         0     104  \n","         105          3.4      3.000      39         0     105  \n","Portugal 123          3.6      3.875      39         1     123  \n","         124          3.2      4.000      45         1     124  \n","         125          3.2      3.500      39         1     125  \n","         126          4.0      4.250      39         1     126  \n","UCSB     408          3.8      2.875      47         4     408  \n","\n","[8 rows x 39 columns]"]},"execution_count":106,"metadata":{},"output_type":"execute_result"}],"source":["#查看所需列中是否存在缺失值\n","df_first5[df_first5[[\"romantic\", \"avoidance_r\"]].isna().any(axis=1)]"]},{"cell_type":"code","execution_count":107,"metadata":{"collapsed":false,"id":"4CDDC72A74D24AA6A4D661FB0B256CCC","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th></th>\n","      <th>age</th>\n","      <th>anxiety</th>\n","      <th>anxiety_r</th>\n","      <th>artgluctot</th>\n","      <th>attachhome</th>\n","      <th>attachphone</th>\n","      <th>AvgHumidity</th>\n","      <th>avgtemp</th>\n","      <th>avoidance</th>\n","      <th>avoidance_r</th>\n","      <th>...</th>\n","      <th>sex</th>\n","      <th>Site</th>\n","      <th>smoke</th>\n","      <th>socialdiversity</th>\n","      <th>socialembedded</th>\n","      <th>socTherm</th>\n","      <th>soliTherm</th>\n","      <th>stress</th>\n","      <th>site_idx</th>\n","      <th>obs_id</th>\n","    </tr>\n","    <tr>\n","      <th>Site</th>\n","      <th>obs_id</th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","      <th></th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","  </tbody>\n","</table>\n","<p>0 rows × 39 columns</p>\n","</div>"],"text/plain":["Empty DataFrame\n","Columns: [age, anxiety, anxiety_r, artgluctot, attachhome, attachphone, AvgHumidity, avgtemp, avoidance, avoidance_r, cigs, didf, eatdrink, eot, exercise, gluctot, health, hiTemp, kamf, langfamily, language, mintemp, monogamous, networksize, nostalgia, onlineid, riskAvd, romantic, scontrol, sex, Site, smoke, socialdiversity, socialembedded, socTherm, soliTherm, stress, site_idx, obs_id]\n","Index: []\n","\n","[0 rows x 39 columns]"]},"execution_count":107,"metadata":{},"output_type":"execute_result"}],"source":["#删除缺失值\n","df_first5.dropna(subset=[\"romantic\", \"avoidance_r\"], inplace=True)\n","#再次查看所需列中是否存在缺失值\n","df_first5[df_first5[\"romantic\"].isna()]"]},{"cell_type":"code","execution_count":108,"metadata":{"collapsed":false,"id":"845615681AA9451D9BF03E25AAC875F7","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[],"source":["#对数据进行重新编码\n","df_first5[\"romantic\"] =  np.where(df_first5['romantic'] == 2, 0, 1)"]},{"cell_type":"code","execution_count":109,"metadata":{"collapsed":false,"id":"F308E0BE40A94965B9A698B1C3FAD8DF","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/AEDAE9452CFB4FC499011CDBCE4BCF95/s5wlbmyrnh.png\">"],"text/plain":["<Figure size 2000x400 with 5 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["# 创建画图所需的网格数\n","g = sns.FacetGrid(df_first5, col=\"Site\", col_wrap=5, height=4)\n","\n","# 将各个图所画的内容对应到画布上\n","g.map(sns.regplot, \"avoidance_r\", \"romantic\")\n","\n","# 调整y轴的刻度\n","plt.ylim(-0.5,1.5)\n","plt.yticks([0,1])\n","# Show the plot\n","plt.show()"]},{"cell_type":"markdown","metadata":{"id":"94B3C8243FCB4F63A87C5C4F28CEDBE1","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 完全池化模型  \n","\n","#### 模型定义  \n","\n","在这里，对完全池化模型的定义，和我们在lec13中介绍过的logistic回归模型是一样的  \n","\n","对先前介绍过的模型定义进行回顾：  \n","\n","* 因变量恋爱情况为二分变量  \n","\n","$$  \n","Y_{ij} = \\begin{cases}  \n","1 & \\text{yes} \\\\  \n","0 & \\text{no} \\\\  \n","\\end{cases}  \n","$$  \n","\n","* 恋爱情况与回避依恋分数的情况可以表示为：  \n","$$  \n","\\begin{split}  \n","Y_{ij}|\\beta_0,\\beta_1 & \\stackrel{ind}{\\sim} \\text{Bern}(\\pi_{ij}) \\;\\; \\text{ with } \\;\\; \\pi_i = \\frac{e^{\\beta_0 + \\beta_1 X_{ij}}}{1 + e^{\\beta_0 + \\beta_1 X_{ij}}}  \\\\  \n","\\beta_{0}  &  \\sim N\\left(0, 0.5^2 \\right)  \\\\  \n","\\beta_1  &  \\sim N\\left(0, 0.5^2 \\right)   \\\\  \n","\\end{split}  \n","$$  \n","\n","* 注意对$\\beta_0,\\beta_1$在整体logistic回归中的意义，在这里仅简单解释为线性关系中的斜率和截距  \n","\n","> 注：在代码的模型定义中，我们使用的是bambi默认的先验，此处先验定义中的具体数值只为辅助说明使用。"]},{"cell_type":"markdown","metadata":{"id":"EA0A15A819DC41249D0B2A7D74A75CEC","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["#### MCMC采样&后验参数估计"]},{"cell_type":"code","execution_count":110,"metadata":{"collapsed":false,"id":"1BDFDFE899B94009A06666B2F25EC053","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Modeling the probability that romantic==1\n","Auto-assigning NUTS sampler...\n","Initializing NUTS using jitter+adapt_diag...\n","Multiprocess sampling (4 chains in 4 jobs)\n","NUTS: [Intercept, avoidance_r]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling 4 chains for 1_000 tune and 1_000 draw iterations (4_000 + 4_000 draws total) took 2 seconds.\n"]}],"source":["complete_logit_bmb = bmb.Model(\"romantic ~ avoidance_r\", \n","                               df_first5, \n","                               family=\"bernoulli\")\n","complete_logit_trace = complete_logit_bmb.fit(random_seed=84735)"]},{"cell_type":"markdown","metadata":{"id":"7E15892E145B4872A2CB6081027CA755","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["**后验参数解释**  \n","\n","* `avoidance_r`为共同的斜率  \n","\n","* `Intercept`为共同的截距  \n"]},{"cell_type":"code","execution_count":111,"metadata":{"collapsed":false,"id":"1362DC6656A14280A8169C48D0A34455","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>mean</th>\n","      <th>sd</th>\n","      <th>hdi_3%</th>\n","      <th>hdi_97%</th>\n","      <th>mcse_mean</th>\n","      <th>mcse_sd</th>\n","      <th>ess_bulk</th>\n","      <th>ess_tail</th>\n","      <th>r_hat</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>Intercept</th>\n","      <td>-0.055</td>\n","      <td>0.100</td>\n","      <td>-0.234</td>\n","      <td>0.147</td>\n","      <td>0.002</td>\n","      <td>0.001</td>\n","      <td>3799.0</td>\n","      <td>2578.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r</th>\n","      <td>-0.011</td>\n","      <td>0.099</td>\n","      <td>-0.191</td>\n","      <td>0.173</td>\n","      <td>0.002</td>\n","      <td>0.001</td>\n","      <td>3963.0</td>\n","      <td>2960.0</td>\n","      <td>1.0</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["              mean     sd  hdi_3%  hdi_97%  mcse_mean  mcse_sd  ess_bulk  \\\n","Intercept   -0.055  0.100  -0.234    0.147      0.002    0.001    3799.0   \n","avoidance_r -0.011  0.099  -0.191    0.173      0.002    0.001    3963.0   \n","\n","             ess_tail  r_hat  \n","Intercept      2578.0    1.0  \n","avoidance_r    2960.0    1.0  "]},"execution_count":111,"metadata":{},"output_type":"execute_result"}],"source":["az.summary(complete_logit_trace)"]},{"cell_type":"markdown","metadata":{"id":"669BE0FB73594AE2AA83A78AB81F18B5","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 变化截距模型  \n","\n","#### 模型定义  \n","\n","* 考虑线性关系(截距)在不同站点间的不同  \n","\n","$$  \n","\\begin{array}{rll}  \n","Y_{ij}|\\beta_{0j},\\beta_{1j} & \\sim \\text{Bern}(\\pi_{ij})\\; \\text{ with } \\;\\; \\pi_i = \\frac{e^{\\beta_{0j} + \\beta_{1} X_{ij}}}{1 + e^{\\beta_{0j} + \\beta_{1} X_{ij}}} \\\\  \n","&& \\text{(每个站点 $j$内的线性模型)}\\\\  \n","\n","\\beta_{0j} &= \\beta_0 + b_{0j}\\;\\;\\;b_{0j} \\sim N(0, \\sigma_0^2)& \\text{(截距在站点间的变化)} \\\\  \n","\n","\\beta_{0}  &  \\sim N\\left(0, 0.5^2 \\right) & \\text{(全局参数的先验)}\\\\  \n","\\beta_1  &  \\sim N\\left(0, 0.5^2 \\right) & \\\\  \n","\\sigma_0 & \\sim \\text{Exp}(1) & \\\\  \n","\\end{array}  \n","\n","$$  \n","\n","* 模型图中的`Intercept`即为$\\beta_{0}$，`1|Site`即为$b_{0j}$"]},{"cell_type":"code","execution_count":112,"metadata":{"collapsed":false,"id":"6FBD061FFFCC4AD48BC88E918FAB4D13","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/99DC5149DC2F423E870A7A3A7975232A/s5wlc3wsxg.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e216fb2e0>"]},"execution_count":112,"metadata":{},"output_type":"execute_result"}],"source":["# common slope/ common intercept + group-specific intercept\n","inter_logit_bmb = bmb.Model(\"romantic ~ avoidance_r + (1|Site)\",\n","                               df_first5,\n","                               family=\"bernoulli\")\n","inter_logit_bmb.build()\n","inter_logit_bmb.graph()"]},{"cell_type":"markdown","metadata":{"id":"B7A10C132E9C4D30A6F8B25E698773EB","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["#### MCMC采样&后验参数估计"]},{"cell_type":"code","execution_count":113,"metadata":{"collapsed":false,"id":"DB1F02A4D8D344DC9C11D90A359B881E","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Modeling the probability that romantic==1\n","Auto-assigning NUTS sampler...\n","Initializing NUTS using jitter+adapt_diag...\n","Multiprocess sampling (4 chains in 4 jobs)\n","NUTS: [Intercept, avoidance_r, 1|Site_sigma, 1|Site_offset]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 92 seconds.\n"]}],"source":["inter_logit_trace = inter_logit_bmb.fit(draws=5000,           \n","                                    tune=1000,                    \n","                                    chains=4,                     \n","                                    discard_tuned_samples= True,  \n","                                    random_seed=84735,\n","                                    target_accept=0.99)"]},{"cell_type":"markdown","metadata":{"id":"BBF9D36BC5FC4DC08DEDE6F32F95EBA8","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["**后验参数解释**  \n","\n","* `avoidance_r`为共同的斜率  \n","\n","* `Intercept`为共同的截距  \n","\n","* `1|Site[xx]`为每一组在截距上的变异  \n","\n","    * 如，Kassel站点的截距为：0.250+0.336 = 0.586"]},{"cell_type":"code","execution_count":114,"metadata":{"collapsed":false,"id":"05EAB9121CF54C2DA99D8F6FF2762302","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>mean</th>\n","      <th>sd</th>\n","      <th>hdi_3%</th>\n","      <th>hdi_97%</th>\n","      <th>mcse_mean</th>\n","      <th>mcse_sd</th>\n","      <th>ess_bulk</th>\n","      <th>ess_tail</th>\n","      <th>r_hat</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>Intercept</th>\n","      <td>0.253</td>\n","      <td>0.491</td>\n","      <td>-0.618</td>\n","      <td>1.232</td>\n","      <td>0.007</td>\n","      <td>0.005</td>\n","      <td>5659.0</td>\n","      <td>6990.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r</th>\n","      <td>-0.013</td>\n","      <td>0.102</td>\n","      <td>-0.205</td>\n","      <td>0.177</td>\n","      <td>0.001</td>\n","      <td>0.001</td>\n","      <td>14612.0</td>\n","      <td>12245.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>1|Site_sigma</th>\n","      <td>0.903</td>\n","      <td>0.546</td>\n","      <td>0.190</td>\n","      <td>1.881</td>\n","      <td>0.008</td>\n","      <td>0.006</td>\n","      <td>4724.0</td>\n","      <td>7385.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>1|Site[Kassel]</th>\n","      <td>0.334</td>\n","      <td>0.508</td>\n","      <td>-0.691</td>\n","      <td>1.237</td>\n","      <td>0.007</td>\n","      <td>0.005</td>\n","      <td>6089.0</td>\n","      <td>7630.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>1|Site[Portugal]</th>\n","      <td>0.241</td>\n","      <td>0.585</td>\n","      <td>-0.825</td>\n","      <td>1.410</td>\n","      <td>0.007</td>\n","      <td>0.005</td>\n","      <td>7497.0</td>\n","      <td>9230.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>1|Site[Southampton]</th>\n","      <td>0.592</td>\n","      <td>0.766</td>\n","      <td>-0.702</td>\n","      <td>2.128</td>\n","      <td>0.008</td>\n","      <td>0.006</td>\n","      <td>8948.0</td>\n","      <td>10482.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>1|Site[Tsinghua]</th>\n","      <td>-0.732</td>\n","      <td>0.510</td>\n","      <td>-1.730</td>\n","      <td>0.154</td>\n","      <td>0.007</td>\n","      <td>0.005</td>\n","      <td>5953.0</td>\n","      <td>7389.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>1|Site[UCSB]</th>\n","      <td>-0.359</td>\n","      <td>0.511</td>\n","      <td>-1.343</td>\n","      <td>0.573</td>\n","      <td>0.007</td>\n","      <td>0.005</td>\n","      <td>5912.0</td>\n","      <td>7380.0</td>\n","      <td>1.0</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                      mean     sd  hdi_3%  hdi_97%  mcse_mean  mcse_sd  \\\n","Intercept            0.253  0.491  -0.618    1.232      0.007    0.005   \n","avoidance_r         -0.013  0.102  -0.205    0.177      0.001    0.001   \n","1|Site_sigma         0.903  0.546   0.190    1.881      0.008    0.006   \n","1|Site[Kassel]       0.334  0.508  -0.691    1.237      0.007    0.005   \n","1|Site[Portugal]     0.241  0.585  -0.825    1.410      0.007    0.005   \n","1|Site[Southampton]  0.592  0.766  -0.702    2.128      0.008    0.006   \n","1|Site[Tsinghua]    -0.732  0.510  -1.730    0.154      0.007    0.005   \n","1|Site[UCSB]        -0.359  0.511  -1.343    0.573      0.007    0.005   \n","\n","                     ess_bulk  ess_tail  r_hat  \n","Intercept              5659.0    6990.0    1.0  \n","avoidance_r           14612.0   12245.0    1.0  \n","1|Site_sigma           4724.0    7385.0    1.0  \n","1|Site[Kassel]         6089.0    7630.0    1.0  \n","1|Site[Portugal]       7497.0    9230.0    1.0  \n","1|Site[Southampton]    8948.0   10482.0    1.0  \n","1|Site[Tsinghua]       5953.0    7389.0    1.0  \n","1|Site[UCSB]           5912.0    7380.0    1.0  "]},"execution_count":114,"metadata":{},"output_type":"execute_result"}],"source":["az.summary(inter_logit_trace)"]},{"cell_type":"markdown","metadata":{"id":"5B6C78A26D334BD5AF10B2A1CB517EC9","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 变化斜率模型  \n","\n","#### 模型定义  \n","\n","* 考虑线性关系(斜率)在不同站点间的不同  \n","\n","$$  \n","\\begin{array}{rll}  \n","Y_{ij}|\\beta_{0j},\\beta_{1j} & \\sim \\text{Bern}(\\pi_{ij})\\; \\text{ with } \\;\\; \\pi_i = \\frac{e^{\\beta_{0} + \\beta_{1j} X_{ij}}}{1 + e^{\\beta_{0} + \\beta_{1j} X_{ij}}} \\\\  \n","&& \\text{(每个站点 $j$内的线性模型)}\\\\  \n","\\beta_{1j} &= \\beta_1 + b_{1j}\\;\\;\\;b_{1j} \\sim N(0, \\sigma_1^2)& \\text{(斜率在站点间的变化)} \\\\  \n","\n","\\beta_{0}  &  \\sim N\\left(0, 0.5^2 \\right) & \\text{(全局参数的先验)}\\\\  \n","\\beta_1  &  \\sim N\\left(0, 0.5^2 \\right) & \\\\  \n","\\sigma_1 & \\sim \\text{Exp}(1) & \\\\  \n","\\end{array}  \n","\n","$$"]},{"cell_type":"code","execution_count":115,"metadata":{"collapsed":false,"id":"27B9AA5816BC4F6C8D2F0A110112DA2F","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/BE5683FC8E3242DE923BA11ED29DAAE4/s5wlf39ap4.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e1fdcfb50>"]},"execution_count":115,"metadata":{},"output_type":"execute_result"}],"source":["# common slope +group-specific slope/ common intercept + group-specific intercept\n","slope_logit_bmb = bmb.Model(\"romantic ~ avoidance_r + (0 + avoidance_r|Site)\",\n","                               df_first5,\n","                               family=\"bernoulli\")\n","slope_logit_bmb.build()\n","slope_logit_bmb.graph()"]},{"cell_type":"markdown","metadata":{"id":"56EF1EE643CE4B7A8AB59B1AEAA6A8D8","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["#### MCMC采样&后验参数估计"]},{"cell_type":"code","execution_count":116,"metadata":{"collapsed":false,"id":"FD45D7A2BAEF49A88DCD09EB71D92C41","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Modeling the probability that romantic==1\n","Auto-assigning NUTS sampler...\n","Initializing NUTS using jitter+adapt_diag...\n","Multiprocess sampling (4 chains in 4 jobs)\n","NUTS: [Intercept, avoidance_r, avoidance_r|Site_sigma, avoidance_r|Site_offset]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 46 seconds.\n","There were 4 divergences after tuning. Increase `target_accept` or reparameterize.\n"]}],"source":["slope_logit_trace = slope_logit_bmb.fit(draws=5000,           \n","                                    tune=1000,                    \n","                                    chains=4,                     \n","                                    discard_tuned_samples= True,  \n","                                    random_seed=84735,\n","                                    target_accept=0.99)"]},{"cell_type":"markdown","metadata":{"id":"FFE270CF90D5467FB3B3BCE36A33E512","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["**后验参数解释**  \n","\n","* `Intercept`为共同的截距  \n","\n","* `avoidance_r`为共同的斜率  \n","\n","* `avoidance_r|Site[xx]`为每一组在斜率上的变异  \n","\n","    * 如，Kassel站点的斜率为：0.003+0.036 = 0.039"]},{"cell_type":"code","execution_count":117,"metadata":{"collapsed":false,"id":"FDC3D6DEF10947409EA66ED9C76B8F6E","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>mean</th>\n","      <th>sd</th>\n","      <th>hdi_3%</th>\n","      <th>hdi_97%</th>\n","      <th>mcse_mean</th>\n","      <th>mcse_sd</th>\n","      <th>ess_bulk</th>\n","      <th>ess_tail</th>\n","      <th>r_hat</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>Intercept</th>\n","      <td>-0.054</td>\n","      <td>0.101</td>\n","      <td>-0.242</td>\n","      <td>0.134</td>\n","      <td>0.001</td>\n","      <td>0.001</td>\n","      <td>15593.0</td>\n","      <td>13511.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r</th>\n","      <td>0.004</td>\n","      <td>0.200</td>\n","      <td>-0.361</td>\n","      <td>0.369</td>\n","      <td>0.003</td>\n","      <td>0.004</td>\n","      <td>5796.0</td>\n","      <td>4640.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r|Site_sigma</th>\n","      <td>0.250</td>\n","      <td>0.268</td>\n","      <td>0.000</td>\n","      <td>0.674</td>\n","      <td>0.004</td>\n","      <td>0.003</td>\n","      <td>4962.0</td>\n","      <td>5628.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r|Site[Kassel]</th>\n","      <td>0.037</td>\n","      <td>0.209</td>\n","      <td>-0.354</td>\n","      <td>0.441</td>\n","      <td>0.003</td>\n","      <td>0.004</td>\n","      <td>6482.0</td>\n","      <td>5538.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r|Site[Portugal]</th>\n","      <td>0.007</td>\n","      <td>0.247</td>\n","      <td>-0.474</td>\n","      <td>0.502</td>\n","      <td>0.003</td>\n","      <td>0.003</td>\n","      <td>10296.0</td>\n","      <td>7867.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r|Site[Southampton]</th>\n","      <td>0.008</td>\n","      <td>0.291</td>\n","      <td>-0.560</td>\n","      <td>0.553</td>\n","      <td>0.003</td>\n","      <td>0.004</td>\n","      <td>14148.0</td>\n","      <td>9954.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r|Site[Tsinghua]</th>\n","      <td>-0.091</td>\n","      <td>0.207</td>\n","      <td>-0.521</td>\n","      <td>0.258</td>\n","      <td>0.003</td>\n","      <td>0.003</td>\n","      <td>5603.0</td>\n","      <td>5199.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r|Site[UCSB]</th>\n","      <td>0.055</td>\n","      <td>0.208</td>\n","      <td>-0.326</td>\n","      <td>0.464</td>\n","      <td>0.003</td>\n","      <td>0.004</td>\n","      <td>6622.0</td>\n","      <td>5663.0</td>\n","      <td>1.0</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                mean     sd  hdi_3%  hdi_97%  mcse_mean  \\\n","Intercept                     -0.054  0.101  -0.242    0.134      0.001   \n","avoidance_r                    0.004  0.200  -0.361    0.369      0.003   \n","avoidance_r|Site_sigma         0.250  0.268   0.000    0.674      0.004   \n","avoidance_r|Site[Kassel]       0.037  0.209  -0.354    0.441      0.003   \n","avoidance_r|Site[Portugal]     0.007  0.247  -0.474    0.502      0.003   \n","avoidance_r|Site[Southampton]  0.008  0.291  -0.560    0.553      0.003   \n","avoidance_r|Site[Tsinghua]    -0.091  0.207  -0.521    0.258      0.003   \n","avoidance_r|Site[UCSB]         0.055  0.208  -0.326    0.464      0.003   \n","\n","                               mcse_sd  ess_bulk  ess_tail  r_hat  \n","Intercept                        0.001   15593.0   13511.0    1.0  \n","avoidance_r                      0.004    5796.0    4640.0    1.0  \n","avoidance_r|Site_sigma           0.003    4962.0    5628.0    1.0  \n","avoidance_r|Site[Kassel]         0.004    6482.0    5538.0    1.0  \n","avoidance_r|Site[Portugal]       0.003   10296.0    7867.0    1.0  \n","avoidance_r|Site[Southampton]    0.004   14148.0    9954.0    1.0  \n","avoidance_r|Site[Tsinghua]       0.003    5603.0    5199.0    1.0  \n","avoidance_r|Site[UCSB]           0.004    6622.0    5663.0    1.0  "]},"execution_count":117,"metadata":{},"output_type":"execute_result"}],"source":["az.summary(slope_logit_trace)"]},{"cell_type":"markdown","metadata":{"id":"CA420E9280CF40F592ED57D9E1841051","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 变化斜率、截距模型  \n","\n","#### 模型定义  \n","\n","* 考虑线性关系在不同站点间的不同  \n","\n","$$  \n","\\begin{array}{rll}  \n","Y_{ij}|\\beta_{0j},\\beta_{1j} & \\sim \\text{Bern}(\\pi_{ij})\\; \\text{ with } \\;\\; \\pi_i = \\frac{e^{\\beta_{0j} + \\beta_{1j} X_{ij}}}{1 + e^{\\beta_{0j} + \\beta_{1j} X_{ij}}} \\\\  \n","&& \\text{(每个站点 $j$内的线性模型)}\\\\  \n","\n","\\beta_{0j} &= \\beta_0 + b_{0j}\\;\\;\\;b_{0j} \\sim N(0, \\sigma_0^2)& \\text{(截距在站点间的变化)} \\\\  \n","\n","\\beta_{1j} &= \\beta_1 + b_{1j}\\;\\;\\;b_{1j} \\sim N(0, \\sigma_1^2)& \\text{(斜率在站点间的变化)} \\\\  \n","\n","\\beta_{0}  &  \\sim N\\left(0, 0.5^2 \\right) & \\text{(全局参数的先验)}\\\\  \n","\\beta_1  &  \\sim N\\left(0, 0.5^2 \\right) & \\\\  \n","\\sigma_0 & \\sim \\text{Exp}(1) & \\\\  \n","\\sigma_1 & \\sim \\text{Exp}(1) & \\\\  \n","\\end{array}  \n","\n","$$"]},{"cell_type":"code","execution_count":118,"metadata":{"collapsed":false,"id":"AB8261927E1948BF953C4C7EBD5EC7CD","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/E4551ECBBF0542B58E6D0F2435C840E5/s5wlgq6882.svg\">"],"text/plain":["<graphviz.graphs.Digraph at 0x7f5e1b9ff0a0>"]},"execution_count":118,"metadata":{},"output_type":"execute_result"}],"source":["# common slope +group-specific slope/ common intercept + group-specific intercept\n","both_logit_bmb = bmb.Model(\"romantic ~ avoidance_r + (avoidance_r|Site)\",\n","                               df_first5,\n","                               family=\"bernoulli\")\n","both_logit_bmb.build()\n","both_logit_bmb.graph()"]},{"cell_type":"markdown","metadata":{"id":"51BA571852E04A0DA8F8D51F05A6C241","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["#### MCMC采样&后验参数解释"]},{"cell_type":"code","execution_count":119,"metadata":{"collapsed":false,"id":"D08D84410E7141FF85BA2D61C4321FE3","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Modeling the probability that romantic==1\n","Auto-assigning NUTS sampler...\n","Initializing NUTS using jitter+adapt_diag...\n","Multiprocess sampling (4 chains in 4 jobs)\n","NUTS: [Intercept, avoidance_r, 1|Site_sigma, 1|Site_offset, avoidance_r|Site_sigma, avoidance_r|Site_offset]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 110 seconds.\n"]}],"source":["both_logit_trace = both_logit_bmb.fit(draws=5000,           \n","                                    tune=1000,                    \n","                                    chains=4,                     \n","                                    discard_tuned_samples= True,  \n","                                    random_seed=84735,\n","                                    target_accept=0.99)"]},{"cell_type":"code","execution_count":120,"metadata":{"collapsed":false,"id":"AD1C6BD68E7941D198303A09795C8A84","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["\n","            <div>\n","              <div class='xr-header'>\n","                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n","              </div>\n","              <ul class=\"xr-sections group-sections\">\n","              \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_posterior2213ece8-c544-41a0-9f6c-833f0cd64f7a\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_posterior2213ece8-c544-41a0-9f6c-833f0cd64f7a\" class = \"xr-section-summary\">posterior</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:                 (chain: 4, draw: 5000, Site__factor_dim: 5)\n","Coordinates:\n","  * chain                   (chain) int64 0 1 2 3\n","  * draw                    (draw) int64 0 1 2 3 4 ... 4995 4996 4997 4998 4999\n","  * Site__factor_dim        (Site__factor_dim) &lt;U11 &#x27;Kassel&#x27; ... &#x27;UCSB&#x27;\n","Data variables:\n","    Intercept               (chain, draw) float64 -0.1513 -0.3159 ... 0.5841\n","    avoidance_r             (chain, draw) float64 0.2659 0.7168 ... -0.09063\n","    1|Site_sigma            (chain, draw) float64 0.2501 0.1936 ... 0.9701\n","    avoidance_r|Site_sigma  (chain, draw) float64 0.2631 1.035 ... 0.1903 0.4568\n","    1|Site                  (chain, draw, Site__factor_dim) float64 0.2677 .....\n","    avoidance_r|Site        (chain, draw, Site__factor_dim) float64 -0.08791 ...\n","Attributes:\n","    created_at:                  2023-12-19T07:45:38.244273\n","    arviz_version:               0.16.0\n","    inference_library:           pymc\n","    inference_library_version:   5.6.0\n","    sampling_time:               110.27536106109619\n","    tuning_steps:                1000\n","    modeling_interface:          bambi\n","    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-61c80d10-26bd-4b26-a308-a579836b2da2' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-61c80d10-26bd-4b26-a308-a579836b2da2' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>Site__factor_dim</span>: 5</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-c8769f3a-c843-4afa-b55a-8b620b2c9787' class='xr-section-summary-in' type='checkbox'  checked><label for='section-c8769f3a-c843-4afa-b55a-8b620b2c9787' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-3ec36828-f085-4322-ba2b-c33a5df6f4df' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3ec36828-f085-4322-ba2b-c33a5df6f4df' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-90379fcd-22f1-4afd-848a-543392acfa09' class='xr-var-data-in' type='checkbox'><label for='data-90379fcd-22f1-4afd-848a-543392acfa09' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-adcc39c6-86e2-402c-840c-38defea40c07' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-adcc39c6-86e2-402c-840c-38defea40c07' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-41ecb24e-e58b-41ab-b228-7a4dd2a3d5fd' class='xr-var-data-in' type='checkbox'><label for='data-41ecb24e-e58b-41ab-b228-7a4dd2a3d5fd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>Site__factor_dim</span></div><div class='xr-var-dims'>(Site__factor_dim)</div><div class='xr-var-dtype'>&lt;U11</div><div class='xr-var-preview xr-preview'>&#x27;Kassel&#x27; &#x27;Portugal&#x27; ... &#x27;UCSB&#x27;</div><input id='attrs-e9ff61cd-b7b0-4ee4-9400-0a6ec4fe2e7f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e9ff61cd-b7b0-4ee4-9400-0a6ec4fe2e7f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a3e8587d-8374-46c8-871b-4b65256e0609' class='xr-var-data-in' type='checkbox'><label for='data-a3e8587d-8374-46c8-871b-4b65256e0609' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;Kassel&#x27;, &#x27;Portugal&#x27;, &#x27;Southampton&#x27;, &#x27;Tsinghua&#x27;, &#x27;UCSB&#x27;], dtype=&#x27;&lt;U11&#x27;)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-3a5cdf5b-6b6f-42e2-8f65-16b1c014ab29' class='xr-section-summary-in' type='checkbox'  checked><label for='section-3a5cdf5b-6b6f-42e2-8f65-16b1c014ab29' class='xr-section-summary' >Data variables: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>Intercept</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.1513 -0.3159 ... 0.3389 0.5841</div><input id='attrs-b6dad968-7235-4c60-a3aa-363aec50e90f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b6dad968-7235-4c60-a3aa-363aec50e90f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ccdb125f-4e04-4a45-9fd2-9135a659630a' class='xr-var-data-in' type='checkbox'><label for='data-ccdb125f-4e04-4a45-9fd2-9135a659630a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.151292  , -0.31587127,  0.07066955, ...,  0.39010908,\n","         0.37981408,  0.05284172],\n","       [ 0.24167254,  0.10292586, -0.00104419, ..., -0.10400396,\n","         0.094208  ,  0.18719786],\n","       [ 0.11756161,  0.53176691, -0.10432226, ..., -0.40111246,\n","         0.30454889,  0.40581767],\n","       [-0.2067291 , -0.42922774, -0.34298581, ...,  0.49071173,\n","         0.33887153,  0.58405928]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>avoidance_r</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2659 0.7168 ... 0.1785 -0.09063</div><input id='attrs-0e556116-c5b6-4b11-903f-f1fee2e9c89a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0e556116-c5b6-4b11-903f-f1fee2e9c89a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a3db6003-e0d3-4a64-989a-9e4226306697' class='xr-var-data-in' type='checkbox'><label for='data-a3db6003-e0d3-4a64-989a-9e4226306697' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.26593503,  0.71680617,  0.27858611, ...,  0.02299689,\n","         0.01451107,  0.09067214],\n","       [-0.1058495 , -0.17090847, -0.3889005 , ..., -0.29899644,\n","        -0.72744659, -0.17061327],\n","       [-0.0217773 ,  0.00321363,  0.28690616, ..., -0.16215494,\n","        -0.19671052, -0.18337224],\n","       [-0.13224492,  0.09047397, -0.09957962, ...,  0.10193614,\n","         0.17853907, -0.09063227]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>1|Site_sigma</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2501 0.1936 ... 0.9462 0.9701</div><input id='attrs-af423ebb-4cba-4151-ad99-246b20dcd741' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-af423ebb-4cba-4151-ad99-246b20dcd741' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-22bc7e74-7200-4d5d-99ea-dfb79e0a3479' class='xr-var-data-in' type='checkbox'><label for='data-22bc7e74-7200-4d5d-99ea-dfb79e0a3479' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.2501237 , 0.19360377, 0.35071944, ..., 1.38409841, 1.39399561,\n","        0.550237  ],\n","       [0.43831707, 0.31180262, 0.49017289, ..., 0.73198453, 0.79655602,\n","        0.41956782],\n","       [0.36178054, 0.5533908 , 0.33368728, ..., 0.68548897, 0.25955799,\n","        0.54541755],\n","       [0.35164723, 0.96194603, 0.59841705, ..., 0.57220404, 0.94620629,\n","        0.97012793]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>avoidance_r|Site_sigma</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2631 1.035 ... 0.1903 0.4568</div><input id='attrs-8b455735-68c8-4f3a-a765-d07b85e1570a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8b455735-68c8-4f3a-a765-d07b85e1570a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-077d086b-c32d-4e76-b8f0-2b83f9197bad' class='xr-var-data-in' type='checkbox'><label for='data-077d086b-c32d-4e76-b8f0-2b83f9197bad' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.26312841, 1.03460963, 0.23387368, ..., 0.30141521, 0.32823392,\n","        0.20735774],\n","       [0.21003558, 0.21489849, 0.45861252, ..., 0.48048235, 0.92689632,\n","        0.49801202],\n","       [0.31863904, 0.02042477, 0.23874192, ..., 0.09094108, 0.02948519,\n","        0.05568832],\n","       [0.34513367, 0.18998309, 0.07018655, ..., 0.06258291, 0.19028222,\n","        0.45675646]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>1|Site</span></div><div class='xr-var-dims'>(chain, draw, Site__factor_dim)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2677 -0.03676 ... -1.097 -0.7999</div><input id='attrs-74a8b036-930b-46ba-a224-49a287f54c55' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-74a8b036-930b-46ba-a224-49a287f54c55' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fdcb49ec-912f-4b7b-bdac-d61f12b0bcc4' class='xr-var-data-in' type='checkbox'><label for='data-fdcb49ec-912f-4b7b-bdac-d61f12b0bcc4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[ 0.26765025, -0.03676199,  0.11366981, -0.43781721,\n","          0.09659445],\n","        [ 0.35093826,  0.42648461, -0.20929473, -0.04619555,\n","         -0.08117133],\n","        [-0.06519057, -0.12894764,  1.02726159, -0.67766992,\n","         -0.23213891],\n","        ...,\n","        [ 0.05184218,  0.19819221,  0.99808189, -0.83814782,\n","         -0.44351937],\n","        [ 0.05272128,  0.10622096,  0.94882174, -0.90537761,\n","         -0.49441925],\n","        [ 0.468914  ,  0.5148925 , -0.24301779, -0.43211385,\n","         -0.12416902]],\n","\n","       [[ 0.11292626,  0.31943865,  0.93223043, -0.56920042,\n","         -0.09226257],\n","        [ 0.6143356 ,  0.30236161,  0.69289195, -0.56211189,\n","         -0.04038681],\n","        [ 0.21571495,  0.17750893, -0.48928653, -0.51682674,\n","          0.20049426],\n","...\n","        [ 0.85656382,  0.02725986,  1.27020709,  0.3130623 ,\n","          0.25111566],\n","        [-0.0877241 ,  0.25590904, -0.19958011, -0.60111955,\n","         -0.53225714],\n","        [ 0.03495085,  0.39847907, -0.37872845, -0.94900136,\n","         -0.32768727]],\n","\n","       [[ 0.39383471,  0.89995955, -0.1692577 , -0.0463447 ,\n","          0.08150314],\n","        [ 1.16642632,  0.83949859, -0.61928022, -0.28698126,\n","          0.28336789],\n","        [ 0.8079447 ,  0.55303431,  0.34031343,  0.03203763,\n","          0.29582905],\n","        ...,\n","        [ 0.00479251,  0.03877179, -0.35018199, -1.0493117 ,\n","         -0.82145565],\n","        [ 0.44183773,  0.27105889,  0.89766364, -0.88315321,\n","         -0.40549007],\n","        [-0.14496289, -0.08711663,  1.42481179, -1.0971984 ,\n","         -0.79989427]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>avoidance_r|Site</span></div><div class='xr-var-dims'>(chain, draw, Site__factor_dim)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.08791 -0.7141 ... 0.29 -0.2368</div><input id='attrs-795659dd-dd8b-4cd6-97a5-b6b2967dc412' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-795659dd-dd8b-4cd6-97a5-b6b2967dc412' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-58ed236b-dbe8-4889-ae76-cb577a19bc71' class='xr-var-data-in' type='checkbox'><label for='data-58ed236b-dbe8-4889-ae76-cb577a19bc71' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[-8.79086442e-02, -7.14104320e-01, -2.31505773e-01,\n","         -3.58081837e-01, -5.30299504e-02],\n","        [-5.63013829e-01,  7.73773802e-01,  1.97391408e-01,\n","         -9.39722327e-01, -7.67008889e-01],\n","        [-1.00301320e-01, -5.14766526e-01, -2.06476752e-01,\n","         -4.25613103e-01, -1.19502698e-01],\n","        ...,\n","        [-6.28566926e-02,  8.49015802e-02, -4.35683409e-01,\n","         -6.53280877e-02,  2.03902282e-01],\n","        [-6.43962024e-02,  7.09272718e-02, -4.77700426e-01,\n","         -6.18880290e-02,  2.19476823e-01],\n","        [ 6.74678530e-04, -1.76968536e-01, -1.72044286e-01,\n","         -2.19704420e-01, -1.37719703e-01]],\n","\n","       [[ 5.25268974e-02,  3.84962855e-04,  6.71415887e-03,\n","          1.46762028e-01,  2.81909258e-03],\n","        [ 1.86068678e-01,  2.14594355e-01, -8.23209744e-02,\n","          1.55358890e-01,  4.69000928e-02],\n","        [ 3.84125432e-01,  1.38364147e-01,  4.17263354e-01,\n","         -3.80693542e-04,  6.66587054e-01],\n","...\n","        [ 2.28925633e-02, -5.99768238e-02,  4.39292345e-02,\n","         -1.76109503e-01,  1.01124102e-03],\n","        [-1.48176094e-02,  3.92732075e-04, -8.69331122e-03,\n","          2.96880722e-03, -4.65466458e-03],\n","        [-5.15288047e-02,  6.86609266e-03, -5.17813054e-02,\n","         -1.93316150e-02, -4.57437239e-02]],\n","\n","       [[ 2.29363738e-01, -2.49000254e-01,  4.37709519e-01,\n","          2.74544794e-01,  1.16714146e-01],\n","        [-2.17191786e-02, -3.66426432e-02,  3.52469148e-01,\n","         -1.52700355e-01, -1.29012848e-02],\n","        [ 4.46171894e-02,  9.96099336e-02,  1.28678712e-01,\n","         -1.14439319e-02,  7.11627059e-02],\n","        ...,\n","        [ 2.81871292e-03,  3.87830255e-02,  3.53125533e-02,\n","         -2.97875062e-02,  1.65927409e-02],\n","        [-7.03093089e-02, -7.36976994e-02, -9.54025695e-02,\n","         -3.18843860e-01,  1.13462861e-01],\n","        [ 8.11961100e-02,  1.05063016e-01,  5.08770268e-01,\n","          2.90043669e-01, -2.36844214e-01]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-a9949bcc-21cb-48bf-a15a-455b08615116' class='xr-section-summary-in' type='checkbox'  checked><label for='section-a9949bcc-21cb-48bf-a15a-455b08615116' class='xr-section-summary' >Attributes: <span>(8)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:45:38.244273</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>110.27536106109619</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_sample_stats7c18c624-0de4-41aa-b5e9-89ee1f031d40\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_sample_stats7c18c624-0de4-41aa-b5e9-89ee1f031d40\" class = \"xr-section-summary\">sample_stats</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:                (chain: 4, draw: 5000)\n","Coordinates:\n","  * chain                  (chain) int64 0 1 2 3\n","  * draw                   (draw) int64 0 1 2 3 4 5 ... 4995 4996 4997 4998 4999\n","Data variables: (12/17)\n","    step_size_bar          (chain, draw) float64 0.05385 0.05385 ... 0.0524\n","    perf_counter_start     (chain, draw) float64 2.604e+03 ... 2.695e+03\n","    largest_eigval         (chain, draw) float64 nan nan nan nan ... nan nan nan\n","    lp                     (chain, draw) float64 -300.6 -304.8 ... -289.1 -293.8\n","    max_energy_error       (chain, draw) float64 -0.2429 -0.1253 ... 0.01828\n","    diverging              (chain, draw) bool False False False ... False False\n","    ...                     ...\n","    energy                 (chain, draw) float64 310.7 314.8 ... 299.6 297.8\n","    perf_counter_diff      (chain, draw) float64 0.01319 0.01297 ... 0.01275\n","    n_steps                (chain, draw) float64 63.0 63.0 63.0 ... 95.0 63.0\n","    process_time_diff      (chain, draw) float64 0.01319 0.01297 ... 0.01276\n","    step_size              (chain, draw) float64 0.05117 0.05117 ... 0.05743\n","    reached_max_treedepth  (chain, draw) bool False False False ... False False\n","Attributes:\n","    created_at:                  2023-12-19T07:45:38.287440\n","    arviz_version:               0.16.0\n","    inference_library:           pymc\n","    inference_library_version:   5.6.0\n","    sampling_time:               110.27536106109619\n","    tuning_steps:                1000\n","    modeling_interface:          bambi\n","    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-6fbd009e-f00b-41b6-8389-3d03c6e99aeb' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-6fbd009e-f00b-41b6-8389-3d03c6e99aeb' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-ae09ea0e-af44-48d8-acd6-1e06c33e2e51' class='xr-section-summary-in' type='checkbox'  checked><label for='section-ae09ea0e-af44-48d8-acd6-1e06c33e2e51' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-c7af5b72-c0d2-4e8f-b857-1b1c70daf6d9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c7af5b72-c0d2-4e8f-b857-1b1c70daf6d9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8ce3396f-9762-406a-9fa8-44dbdcb8f58b' class='xr-var-data-in' type='checkbox'><label for='data-8ce3396f-9762-406a-9fa8-44dbdcb8f58b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-db5f9a44-4378-4799-a194-bffc14270bbd' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-db5f9a44-4378-4799-a194-bffc14270bbd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4299b160-d99c-43a5-b58c-cee4a85bf61b' class='xr-var-data-in' type='checkbox'><label for='data-4299b160-d99c-43a5-b58c-cee4a85bf61b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8de76e1a-7ceb-41cd-affa-ae99d7c84ac1' class='xr-section-summary-in' type='checkbox'  ><label for='section-8de76e1a-7ceb-41cd-affa-ae99d7c84ac1' class='xr-section-summary' >Data variables: <span>(17)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>step_size_bar</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.05385 0.05385 ... 0.0524 0.0524</div><input id='attrs-7a01572c-8e35-49a6-84d0-d2823ba7525c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7a01572c-8e35-49a6-84d0-d2823ba7525c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-dba15c43-fabe-4c9b-9b75-acf062b64e28' class='xr-var-data-in' type='checkbox'><label for='data-dba15c43-fabe-4c9b-9b75-acf062b64e28' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.05384587, 0.05384587, 0.05384587, ..., 0.05384587, 0.05384587,\n","        0.05384587],\n","       [0.05484667, 0.05484667, 0.05484667, ..., 0.05484667, 0.05484667,\n","        0.05484667],\n","       [0.05842077, 0.05842077, 0.05842077, ..., 0.05842077, 0.05842077,\n","        0.05842077],\n","       [0.05239575, 0.05239575, 0.05239575, ..., 0.05239575, 0.05239575,\n","        0.05239575]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_start</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.604e+03 2.604e+03 ... 2.695e+03</div><input id='attrs-82e53c5e-a616-460b-8c10-a7681f3dfa76' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-82e53c5e-a616-460b-8c10-a7681f3dfa76' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b918988e-54bd-4a4f-a2f5-ef947a2498fd' class='xr-var-data-in' type='checkbox'><label for='data-b918988e-54bd-4a4f-a2f5-ef947a2498fd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[2604.40591232, 2604.41932778, 2604.43254112, ..., 2687.4303682 ,\n","        2687.44333178, 2687.46869526],\n","       [2602.04662809, 2602.07378882, 2602.08867484, ..., 2690.938726  ,\n","        2690.96524485, 2690.98043476],\n","       [2603.70906116, 2603.72219391, 2603.73510672, ..., 2688.19375898,\n","        2688.21024092, 2688.24492112],\n","       [2604.2842416 , 2604.31482924, 2604.33233995, ..., 2694.65922636,\n","        2694.67239233, 2694.69162413]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>largest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-2bad66c1-5e89-4a56-ba8f-7a7576bf047a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2bad66c1-5e89-4a56-ba8f-7a7576bf047a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-718462e8-9c26-464e-8173-4bc91aa885df' class='xr-var-data-in' type='checkbox'><label for='data-718462e8-9c26-464e-8173-4bc91aa885df' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lp</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-300.6 -304.8 ... -289.1 -293.8</div><input id='attrs-e21faa11-2bd3-4c19-b032-ec327d7ac676' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e21faa11-2bd3-4c19-b032-ec327d7ac676' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a0f90002-5dc3-4557-ab04-07a712ed2de7' class='xr-var-data-in' type='checkbox'><label for='data-a0f90002-5dc3-4557-ab04-07a712ed2de7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-300.58005736, -304.846539  , -303.31725712, ..., -287.83351974,\n","        -287.68440427, -291.35218766],\n","       [-294.32636178, -296.55169304, -296.11235345, ..., -290.65603281,\n","        -289.06899821, -291.84853809],\n","       [-293.43581876, -300.33099351, -299.45467641, ..., -300.30042677,\n","        -301.3740293 , -296.14291996],\n","       [-300.09343201, -294.51818637, -295.49557289, ..., -293.50588749,\n","        -289.10125338, -293.81242915]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>max_energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.2429 -0.1253 ... 0.01828</div><input id='attrs-ab62209b-b47d-4789-bc51-2239eb65635f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ab62209b-b47d-4789-bc51-2239eb65635f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a087bb8c-4b52-4586-91ef-8a9858599335' class='xr-var-data-in' type='checkbox'><label for='data-a087bb8c-4b52-4586-91ef-8a9858599335' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.24294039, -0.12528583,  0.07935867, ..., -0.01932131,\n","         0.05932985,  0.02484814],\n","       [-0.12524393, -0.04607292,  0.0151342 , ..., -0.12915389,\n","        -0.1754288 , -0.11482024],\n","       [-0.01916125,  0.02668119,  0.02620383, ..., -0.16196266,\n","         0.07599891, -0.07241695],\n","       [-0.01840055, -0.0249473 , -0.03120994, ..., -0.02693748,\n","        -0.06945341,  0.01827938]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>diverging</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-e455a6f2-f8be-435b-8b1f-527f0fd50869' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e455a6f2-f8be-435b-8b1f-527f0fd50869' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-90071652-b4ed-4a95-bd7e-12fdd4b0d15a' class='xr-var-data-in' type='checkbox'><label for='data-90071652-b4ed-4a95-bd7e-12fdd4b0d15a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>index_in_trajectory</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>-10 -48 40 19 -34 ... 40 12 47 -21</div><input id='attrs-2579bfb5-31c7-443d-8184-0d3ebe721aa3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2579bfb5-31c7-443d-8184-0d3ebe721aa3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-93ed6dfd-c041-4ce3-bc38-91086652ae47' class='xr-var-data-in' type='checkbox'><label for='data-93ed6dfd-c041-4ce3-bc38-91086652ae47' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-10, -48,  40, ..., -31,   1,  27],\n","       [-11, -18,  37, ...,  23,  37, -77],\n","       [ -1, -46,  54, ...,  30,  54, -15],\n","       [-30, -25,  20, ...,  12,  47, -21]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>acceptance_rate</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.9802 0.9941 ... 0.9971 0.9952</div><input id='attrs-4a1666d9-3961-4510-9350-95a4549a288b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4a1666d9-3961-4510-9350-95a4549a288b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f4200cb1-f28d-45cb-a541-78c825aeb782' class='xr-var-data-in' type='checkbox'><label for='data-f4200cb1-f28d-45cb-a541-78c825aeb782' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.98017824, 0.99410342, 0.9766556 , ..., 0.99951095, 0.98160363,\n","        0.98856524],\n","       [0.99038648, 0.99975351, 0.99664201, ..., 0.99381972, 0.97063884,\n","        0.98135874],\n","       [0.99760482, 0.98691976, 0.99323142, ..., 0.996384  , 0.97660688,\n","        0.99779975],\n","       [0.99828243, 0.9996027 , 0.99863983, ..., 0.99959808, 0.99708138,\n","        0.99519665]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smallest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-75d9d9c1-263c-42ab-ac43-47cda939ba40' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-75d9d9c1-263c-42ab-ac43-47cda939ba40' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ba034dae-5eeb-4a8b-8a53-df04b472d89a' class='xr-var-data-in' type='checkbox'><label for='data-ba034dae-5eeb-4a8b-8a53-df04b472d89a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.01398 -0.08254 ... 0.01307</div><input id='attrs-9ddd187c-d166-4655-9e10-15f4549455cc' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9ddd187c-d166-4655-9e10-15f4549455cc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-28477627-a886-40dc-ae02-46647dde1eae' class='xr-var-data-in' type='checkbox'><label for='data-28477627-a886-40dc-ae02-46647dde1eae' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.01397619, -0.08254369,  0.02199584, ..., -0.00833996,\n","        -0.00171067,  0.01384572],\n","       [ 0.0158455 , -0.00461273, -0.00453449, ...,  0.01573354,\n","        -0.07497912,  0.0307655 ],\n","       [ 0.00010271,  0.01214871, -0.0120604 , ..., -0.01221336,\n","         0.02951682, -0.01542803],\n","       [-0.0046255 , -0.0185283 , -0.00462197, ..., -0.00355517,\n","        -0.02990866,  0.01307176]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tree_depth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>6 6 6 5 7 6 6 6 ... 6 6 6 6 6 6 7 6</div><input id='attrs-f2a075ee-04d8-432b-b611-9e3e2fef9a6e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f2a075ee-04d8-432b-b611-9e3e2fef9a6e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a8769734-178b-458f-a1c7-48082aa5ce92' class='xr-var-data-in' type='checkbox'><label for='data-a8769734-178b-458f-a1c7-48082aa5ce92' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[6, 6, 6, ..., 6, 7, 6],\n","       [7, 6, 6, ..., 7, 6, 7],\n","       [6, 6, 6, ..., 6, 7, 6],\n","       [6, 6, 6, ..., 6, 7, 6]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>310.7 314.8 313.7 ... 299.6 297.8</div><input id='attrs-5843b03f-1baa-4008-8cb6-d51cc308455f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5843b03f-1baa-4008-8cb6-d51cc308455f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a4027290-c152-45b8-aae4-10f55152dabc' class='xr-var-data-in' type='checkbox'><label for='data-a4027290-c152-45b8-aae4-10f55152dabc' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[310.74615539, 314.82044369, 313.71699425, ..., 294.01320518,\n","        293.38167985, 295.66772749],\n","       [300.37778086, 301.85186652, 304.30540824, ..., 295.10162291,\n","        299.3193817 , 296.23818961],\n","       [303.46356679, 305.98773993, 310.18657809, ..., 311.37055396,\n","        308.97089771, 307.9737215 ],\n","       [305.2651457 , 306.66020309, 301.11344611, ..., 297.38252175,\n","        299.5604006 , 297.83657573]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.01319 0.01297 ... 0.01892 0.01275</div><input id='attrs-60b88c36-2668-4020-b9fa-3970a8968573' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-60b88c36-2668-4020-b9fa-3970a8968573' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f0b7f914-706f-444a-b284-78f0e460b5aa' class='xr-var-data-in' type='checkbox'><label for='data-f0b7f914-706f-444a-b284-78f0e460b5aa' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.01318953, 0.01297346, 0.01286071, ..., 0.01273907, 0.02512312,\n","        0.01274174],\n","       [0.02691741, 0.01468914, 0.02359563, ..., 0.02625968, 0.01492511,\n","        0.02633632],\n","       [0.01284256, 0.01269446, 0.01284065, ..., 0.01615119, 0.03446116,\n","        0.01290664],\n","       [0.0300221 , 0.01729865, 0.01268464, ..., 0.01286357, 0.01891835,\n","        0.01275444]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>n_steps</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>63.0 63.0 63.0 ... 63.0 95.0 63.0</div><input id='attrs-c830fca4-48a3-4021-9e92-a437eefe33f9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c830fca4-48a3-4021-9e92-a437eefe33f9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-148a2ea1-d471-4d02-8a94-96d0e177bed4' class='xr-var-data-in' type='checkbox'><label for='data-148a2ea1-d471-4d02-8a94-96d0e177bed4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 63.,  63.,  63., ...,  63., 127.,  63.],\n","       [127.,  63.,  63., ..., 127.,  63., 127.],\n","       [ 63.,  63.,  63., ...,  63., 127.,  63.],\n","       [ 63.,  63.,  63., ...,  63.,  95.,  63.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>process_time_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.01319 0.01297 ... 0.01892 0.01276</div><input id='attrs-074b1dbb-968f-43cb-b7f9-43fc7364cbf4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-074b1dbb-968f-43cb-b7f9-43fc7364cbf4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5f9c9dd6-20a4-402e-8c83-0b46d444f9c5' class='xr-var-data-in' type='checkbox'><label for='data-5f9c9dd6-20a4-402e-8c83-0b46d444f9c5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.01318957, 0.01297385, 0.01286068, ..., 0.0127391 , 0.02512353,\n","        0.01274256],\n","       [0.0269177 , 0.01468926, 0.01360001, ..., 0.02625987, 0.01492622,\n","        0.02633741],\n","       [0.01284267, 0.01269475, 0.01284111, ..., 0.01615165, 0.03344663,\n","        0.01290656],\n","       [0.01701457, 0.01729866, 0.01268434, ..., 0.01286447, 0.01891943,\n","        0.01275534]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.05117 0.05117 ... 0.05743 0.05743</div><input id='attrs-7b7b03bb-d8a3-4b74-88fa-cd843b6fb3f6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7b7b03bb-d8a3-4b74-88fa-cd843b6fb3f6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-475abe84-a379-402e-8d12-d4eedf4109d8' class='xr-var-data-in' type='checkbox'><label for='data-475abe84-a379-402e-8d12-d4eedf4109d8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.05116865, 0.05116865, 0.05116865, ..., 0.05116865, 0.05116865,\n","        0.05116865],\n","       [0.05313998, 0.05313998, 0.05313998, ..., 0.05313998, 0.05313998,\n","        0.05313998],\n","       [0.06188026, 0.06188026, 0.06188026, ..., 0.06188026, 0.06188026,\n","        0.06188026],\n","       [0.05742958, 0.05742958, 0.05742958, ..., 0.05742958, 0.05742958,\n","        0.05742958]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>reached_max_treedepth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-87f91006-d3f0-4efe-ad68-0190abe018fd' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-87f91006-d3f0-4efe-ad68-0190abe018fd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2c4aba57-e63e-4437-b725-d22478d0778c' class='xr-var-data-in' type='checkbox'><label for='data-2c4aba57-e63e-4437-b725-d22478d0778c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-bf673a78-2715-408f-a202-5c4c24094844' class='xr-section-summary-in' type='checkbox'  checked><label for='section-bf673a78-2715-408f-a202-5c4c24094844' class='xr-section-summary' >Attributes: <span>(8)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:45:38.287440</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>110.27536106109619</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_observed_data3e0e8068-af63-4d45-8e86-58c242d61023\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_observed_data3e0e8068-af63-4d45-8e86-58c242d61023\" class = \"xr-section-summary\">observed_data</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:       (romantic_obs: 407)\n","Coordinates:\n","  * romantic_obs  (romantic_obs) int64 0 1 2 3 4 5 6 ... 401 402 403 404 405 406\n","Data variables:\n","    romantic      (romantic_obs) int64 1 1 1 1 1 1 1 1 1 1 ... 0 1 0 0 1 1 1 1 1\n","Attributes:\n","    created_at:                  2023-12-19T07:45:38.295021\n","    arviz_version:               0.16.0\n","    inference_library:           pymc\n","    inference_library_version:   5.6.0\n","    modeling_interface:          bambi\n","    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-9ceefda9-5f30-4283-a944-184c89d5cc14' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-9ceefda9-5f30-4283-a944-184c89d5cc14' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>romantic_obs</span>: 407</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-7a69cf1a-7658-4aab-b25f-1898ffb2fbbf' class='xr-section-summary-in' type='checkbox'  checked><label for='section-7a69cf1a-7658-4aab-b25f-1898ffb2fbbf' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>romantic_obs</span></div><div class='xr-var-dims'>(romantic_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 402 403 404 405 406</div><input id='attrs-2592b1ae-38d8-401d-a7ba-eee5370d95d5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2592b1ae-38d8-401d-a7ba-eee5370d95d5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e6e24ccd-aa2f-46be-9254-61df001ddfe1' class='xr-var-data-in' type='checkbox'><label for='data-e6e24ccd-aa2f-46be-9254-61df001ddfe1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 404, 405, 406])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-182c5a1f-2e57-4722-8faa-2d1790983959' class='xr-section-summary-in' type='checkbox'  checked><label for='section-182c5a1f-2e57-4722-8faa-2d1790983959' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>romantic</span></div><div class='xr-var-dims'>(romantic_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 1 1 1 1 1 1 1 ... 1 0 0 1 1 1 1 1</div><input id='attrs-c112f386-1963-41fb-b637-88618a9f4426' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c112f386-1963-41fb-b637-88618a9f4426' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9fc86425-46e2-4d74-9b3b-5fe971a1a8c9' class='xr-var-data-in' type='checkbox'><label for='data-9fc86425-46e2-4d74-9b3b-5fe971a1a8c9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1,\n","       1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0,\n","       0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1,\n","       1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0,\n","       0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1,\n","       1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1,\n","       0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1,\n","       0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0,\n","       1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0,\n","       0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1,\n","       0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0,\n","       0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0,\n","       0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0,\n","       0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0,\n","       1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0,\n","       1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1,\n","       0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0,\n","       0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0,\n","       0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8fdd928e-8557-4c4c-96f4-4f765b04d7e5' class='xr-section-summary-in' type='checkbox'  checked><label for='section-8fdd928e-8557-4c4c-96f4-4f765b04d7e5' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:45:38.295021</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","              </ul>\n","            </div>\n","            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-sections.group-sections {\n","  grid-template-columns: auto;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt, dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n",".xr-wrap{width:700px!important;} </style>"],"text/plain":["Inference data with groups:\n","\t> posterior\n","\t> sample_stats\n","\t> observed_data"]},"execution_count":120,"metadata":{},"output_type":"execute_result"}],"source":["both_logit_trace"]},{"cell_type":"code","execution_count":121,"metadata":{"collapsed":false,"id":"628F305F5C9C428CAC67F0C444DB4156","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/30F8C4367F744EB88286AF57CCE5F3A4/s5wlkbqihb.png\">"],"text/plain":["<Figure size 1200x1500 with 8 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["az.plot_trace(both_logit_trace,\n","              var_names=[\"~sigma\"],\n","              filter_vars=\"like\",\n","              figsize=(12, 15))\n","plt.show()"]},{"cell_type":"markdown","metadata":{"id":"EEA5A8B8173C4000A42F1CD10D6AF4CC","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["**后验参数解释**  \n","\n","* `Intercept`为共同的截距  \n","\n","* `avoidance_r`为共同的斜率  \n","\n","* `1|Site[xx]`为每一组在截距上的变异  \n","\n","* `avoidance_r|Site[xx]`为每一组在斜率上的变异  \n","\n","    * Kassel站点的斜率为：0.008 + 0.036 = 0.044  \n","\n","    * Kassel站点的截距为：0.239 + 0.350 = 0.589"]},{"cell_type":"code","execution_count":122,"metadata":{"collapsed":false,"id":"1B0E73C216D74B9EBD088FDDD0F4FC7D","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>mean</th>\n","      <th>sd</th>\n","      <th>hdi_3%</th>\n","      <th>hdi_97%</th>\n","      <th>mcse_mean</th>\n","      <th>mcse_sd</th>\n","      <th>ess_bulk</th>\n","      <th>ess_tail</th>\n","      <th>r_hat</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>Intercept</th>\n","      <td>0.261</td>\n","      <td>0.488</td>\n","      <td>-0.621</td>\n","      <td>1.201</td>\n","      <td>0.006</td>\n","      <td>0.005</td>\n","      <td>6163.0</td>\n","      <td>7414.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r</th>\n","      <td>0.002</td>\n","      <td>0.201</td>\n","      <td>-0.364</td>\n","      <td>0.356</td>\n","      <td>0.003</td>\n","      <td>0.003</td>\n","      <td>8305.0</td>\n","      <td>7821.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>1|Site_sigma</th>\n","      <td>0.907</td>\n","      <td>0.542</td>\n","      <td>0.191</td>\n","      <td>1.887</td>\n","      <td>0.007</td>\n","      <td>0.005</td>\n","      <td>6087.0</td>\n","      <td>9085.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r|Site_sigma</th>\n","      <td>0.250</td>\n","      <td>0.261</td>\n","      <td>0.000</td>\n","      <td>0.675</td>\n","      <td>0.003</td>\n","      <td>0.002</td>\n","      <td>5851.0</td>\n","      <td>8085.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>1|Site[Kassel]</th>\n","      <td>0.327</td>\n","      <td>0.506</td>\n","      <td>-0.651</td>\n","      <td>1.273</td>\n","      <td>0.006</td>\n","      <td>0.005</td>\n","      <td>6764.0</td>\n","      <td>7839.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>1|Site[Portugal]</th>\n","      <td>0.238</td>\n","      <td>0.580</td>\n","      <td>-0.820</td>\n","      <td>1.385</td>\n","      <td>0.006</td>\n","      <td>0.005</td>\n","      <td>9527.0</td>\n","      <td>10616.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>1|Site[Southampton]</th>\n","      <td>0.592</td>\n","      <td>0.775</td>\n","      <td>-0.777</td>\n","      <td>2.089</td>\n","      <td>0.007</td>\n","      <td>0.005</td>\n","      <td>12340.0</td>\n","      <td>12683.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>1|Site[Tsinghua]</th>\n","      <td>-0.740</td>\n","      <td>0.508</td>\n","      <td>-1.717</td>\n","      <td>0.167</td>\n","      <td>0.007</td>\n","      <td>0.005</td>\n","      <td>6578.0</td>\n","      <td>7780.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>1|Site[UCSB]</th>\n","      <td>-0.368</td>\n","      <td>0.509</td>\n","      <td>-1.405</td>\n","      <td>0.506</td>\n","      <td>0.007</td>\n","      <td>0.005</td>\n","      <td>6599.0</td>\n","      <td>7526.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r|Site[Kassel]</th>\n","      <td>0.041</td>\n","      <td>0.212</td>\n","      <td>-0.339</td>\n","      <td>0.475</td>\n","      <td>0.003</td>\n","      <td>0.003</td>\n","      <td>9559.0</td>\n","      <td>9858.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r|Site[Portugal]</th>\n","      <td>0.006</td>\n","      <td>0.251</td>\n","      <td>-0.491</td>\n","      <td>0.493</td>\n","      <td>0.003</td>\n","      <td>0.002</td>\n","      <td>14012.0</td>\n","      <td>12988.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r|Site[Southampton]</th>\n","      <td>0.010</td>\n","      <td>0.301</td>\n","      <td>-0.595</td>\n","      <td>0.578</td>\n","      <td>0.002</td>\n","      <td>0.002</td>\n","      <td>17596.0</td>\n","      <td>13307.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r|Site[Tsinghua]</th>\n","      <td>-0.096</td>\n","      <td>0.210</td>\n","      <td>-0.519</td>\n","      <td>0.241</td>\n","      <td>0.003</td>\n","      <td>0.002</td>\n","      <td>7810.0</td>\n","      <td>9097.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>avoidance_r|Site[UCSB]</th>\n","      <td>0.058</td>\n","      <td>0.209</td>\n","      <td>-0.306</td>\n","      <td>0.474</td>\n","      <td>0.003</td>\n","      <td>0.003</td>\n","      <td>8710.0</td>\n","      <td>9239.0</td>\n","      <td>1.0</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                mean     sd  hdi_3%  hdi_97%  mcse_mean  \\\n","Intercept                      0.261  0.488  -0.621    1.201      0.006   \n","avoidance_r                    0.002  0.201  -0.364    0.356      0.003   \n","1|Site_sigma                   0.907  0.542   0.191    1.887      0.007   \n","avoidance_r|Site_sigma         0.250  0.261   0.000    0.675      0.003   \n","1|Site[Kassel]                 0.327  0.506  -0.651    1.273      0.006   \n","1|Site[Portugal]               0.238  0.580  -0.820    1.385      0.006   \n","1|Site[Southampton]            0.592  0.775  -0.777    2.089      0.007   \n","1|Site[Tsinghua]              -0.740  0.508  -1.717    0.167      0.007   \n","1|Site[UCSB]                  -0.368  0.509  -1.405    0.506      0.007   \n","avoidance_r|Site[Kassel]       0.041  0.212  -0.339    0.475      0.003   \n","avoidance_r|Site[Portugal]     0.006  0.251  -0.491    0.493      0.003   \n","avoidance_r|Site[Southampton]  0.010  0.301  -0.595    0.578      0.002   \n","avoidance_r|Site[Tsinghua]    -0.096  0.210  -0.519    0.241      0.003   \n","avoidance_r|Site[UCSB]         0.058  0.209  -0.306    0.474      0.003   \n","\n","                               mcse_sd  ess_bulk  ess_tail  r_hat  \n","Intercept                        0.005    6163.0    7414.0    1.0  \n","avoidance_r                      0.003    8305.0    7821.0    1.0  \n","1|Site_sigma                     0.005    6087.0    9085.0    1.0  \n","avoidance_r|Site_sigma           0.002    5851.0    8085.0    1.0  \n","1|Site[Kassel]                   0.005    6764.0    7839.0    1.0  \n","1|Site[Portugal]                 0.005    9527.0   10616.0    1.0  \n","1|Site[Southampton]              0.005   12340.0   12683.0    1.0  \n","1|Site[Tsinghua]                 0.005    6578.0    7780.0    1.0  \n","1|Site[UCSB]                     0.005    6599.0    7526.0    1.0  \n","avoidance_r|Site[Kassel]         0.003    9559.0    9858.0    1.0  \n","avoidance_r|Site[Portugal]       0.002   14012.0   12988.0    1.0  \n","avoidance_r|Site[Southampton]    0.002   17596.0   13307.0    1.0  \n","avoidance_r|Site[Tsinghua]       0.002    7810.0    9097.0    1.0  \n","avoidance_r|Site[UCSB]           0.003    8710.0    9239.0    1.0  "]},"execution_count":122,"metadata":{},"output_type":"execute_result"}],"source":["az.summary(both_logit_trace)"]},{"cell_type":"markdown","metadata":{"id":"E7F0E6A27B1542709CEC6EBFD937B6E0","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["#### 后验预测分布"]},{"cell_type":"code","execution_count":123,"metadata":{"collapsed":false,"id":"DCA272A273974BECB1564EB8668C9D41","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[],"source":["posterior_predictive = both_logit_bmb.predict(both_logit_trace, kind=\"pps\")"]},{"cell_type":"code","execution_count":124,"metadata":{"collapsed":false,"id":"E1F7BDF6BBA84E50B3B9126A5A850275","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/plain":["<Axes: xlabel='romantic / romantic'>"]},"execution_count":124,"metadata":{},"output_type":"execute_result"},{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/F5AEAC7646BF4D9296C0E30BE6799552/s5wlkgnryr.png\">"],"text/plain":["<Figure size 640x480 with 1 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["az.plot_ppc(both_logit_trace,\n","            num_pp_samples=500)"]},{"cell_type":"markdown","metadata":{"id":"D467C2B9C97E4F4F9931DE1E247C0524","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 预测新站点的数据  \n","\n","* 使用`.predict`，传入模型的MCMC采样结果和新的数据集，就可以在原有模型的基础上对新数据进行预测"]},{"cell_type":"code","execution_count":125,"metadata":{"collapsed":false,"id":"62C31BC514D0457D9FAA3955F67BBE70","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[],"source":["# 选择站点为\"Zurich\"的数据\n","new_group = df_raw[df_raw.Site==\"Zurich\"]\n","# 生成被试索引\n","new_group[\"obs_id\"] = range(len(new_group))\n","# 生成站点索引\n","new_group[\"site_idx\"] = pd.factorize(new_group.Site)[0]\n","# 删除缺失值\n","new_group.dropna(subset=[\"romantic\", \"avoidance_r\"], inplace=True)\n","new_group[new_group[\"romantic\"].isna()]\n","# 对数据进行重新编码\n","new_group[\"romantic\"] =  np.where(new_group['romantic'] == 2, 0, 1)"]},{"cell_type":"code","execution_count":126,"metadata":{"collapsed":false,"id":"CD234DE86F7B423C87DF113D07081C69","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["\n","            <div>\n","              <div class='xr-header'>\n","                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n","              </div>\n","              <ul class=\"xr-sections group-sections\">\n","              \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_posterior84b0a539-3d4f-4ccb-ac44-70706f28a81a\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_posterior84b0a539-3d4f-4ccb-ac44-70706f28a81a\" class = \"xr-section-summary\">posterior</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:                 (chain: 4, draw: 5000, Site__factor_dim: 5,\n","                             romantic_obs: 37)\n","Coordinates:\n","  * chain                   (chain) int64 0 1 2 3\n","  * draw                    (draw) int64 0 1 2 3 4 ... 4995 4996 4997 4998 4999\n","  * Site__factor_dim        (Site__factor_dim) &lt;U11 &#x27;Kassel&#x27; ... &#x27;UCSB&#x27;\n","  * romantic_obs            (romantic_obs) int64 0 1 2 3 4 5 ... 32 33 34 35 36\n","Data variables:\n","    Intercept               (chain, draw) float64 -0.1513 -0.3159 ... 0.5841\n","    avoidance_r             (chain, draw) float64 0.2659 0.7168 ... -0.09063\n","    1|Site_sigma            (chain, draw) float64 0.2501 0.1936 ... 0.9701\n","    avoidance_r|Site_sigma  (chain, draw) float64 0.2631 1.035 ... 0.1903 0.4568\n","    1|Site                  (chain, draw, Site__factor_dim) float64 0.2677 .....\n","    avoidance_r|Site        (chain, draw, Site__factor_dim) float64 -0.08791 ...\n","    romantic_mean           (chain, draw, romantic_obs) float64 0.496 ... 0.4208\n","Attributes:\n","    created_at:                  2023-12-19T07:45:38.244273\n","    arviz_version:               0.16.0\n","    inference_library:           pymc\n","    inference_library_version:   5.6.0\n","    sampling_time:               110.27536106109619\n","    tuning_steps:                1000\n","    modeling_interface:          bambi\n","    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-67fbf0c9-5ecf-4f5b-8262-163e2cc90d65' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-67fbf0c9-5ecf-4f5b-8262-163e2cc90d65' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>Site__factor_dim</span>: 5</li><li><span class='xr-has-index'>romantic_obs</span>: 37</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-4f70aeb4-8979-4125-a263-36ca24c2bb30' class='xr-section-summary-in' type='checkbox'  checked><label for='section-4f70aeb4-8979-4125-a263-36ca24c2bb30' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-a0a5f2ec-46c0-4368-940c-02adb79a154d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a0a5f2ec-46c0-4368-940c-02adb79a154d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5f174da7-f955-4f27-9c6d-aa47b43c3f5f' class='xr-var-data-in' type='checkbox'><label for='data-5f174da7-f955-4f27-9c6d-aa47b43c3f5f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-5bdaadbb-23ae-44b2-9ff1-4313fb8c0584' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5bdaadbb-23ae-44b2-9ff1-4313fb8c0584' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-37ec8b3f-0201-4c81-a8bd-a00b51c55c23' class='xr-var-data-in' type='checkbox'><label for='data-37ec8b3f-0201-4c81-a8bd-a00b51c55c23' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>Site__factor_dim</span></div><div class='xr-var-dims'>(Site__factor_dim)</div><div class='xr-var-dtype'>&lt;U11</div><div class='xr-var-preview xr-preview'>&#x27;Kassel&#x27; &#x27;Portugal&#x27; ... &#x27;UCSB&#x27;</div><input id='attrs-21b2e9a5-e9d9-4142-ab69-8a397c512a3f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-21b2e9a5-e9d9-4142-ab69-8a397c512a3f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b5baab12-169e-4503-b503-64e964b924b3' class='xr-var-data-in' type='checkbox'><label for='data-b5baab12-169e-4503-b503-64e964b924b3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;Kassel&#x27;, &#x27;Portugal&#x27;, &#x27;Southampton&#x27;, &#x27;Tsinghua&#x27;, &#x27;UCSB&#x27;], dtype=&#x27;&lt;U11&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>romantic_obs</span></div><div class='xr-var-dims'>(romantic_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 31 32 33 34 35 36</div><input id='attrs-7c38313a-c816-4299-a533-4ee0e1b8dd42' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7c38313a-c816-4299-a533-4ee0e1b8dd42' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-eba52e05-0d5d-4615-9b12-8da0f49dc024' class='xr-var-data-in' type='checkbox'><label for='data-eba52e05-0d5d-4615-9b12-8da0f49dc024' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,\n","       18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,\n","       36])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-3a468b9c-0ef8-42bc-bcef-6e8981ecfe35' class='xr-section-summary-in' type='checkbox'  checked><label for='section-3a468b9c-0ef8-42bc-bcef-6e8981ecfe35' class='xr-section-summary' >Data variables: <span>(7)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>Intercept</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.1513 -0.3159 ... 0.3389 0.5841</div><input id='attrs-55eace07-85ee-40fa-b057-5ca19db9a23f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-55eace07-85ee-40fa-b057-5ca19db9a23f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-35348f6f-9549-45f0-a786-bee3044cd215' class='xr-var-data-in' type='checkbox'><label for='data-35348f6f-9549-45f0-a786-bee3044cd215' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.151292  , -0.31587127,  0.07066955, ...,  0.39010908,\n","         0.37981408,  0.05284172],\n","       [ 0.24167254,  0.10292586, -0.00104419, ..., -0.10400396,\n","         0.094208  ,  0.18719786],\n","       [ 0.11756161,  0.53176691, -0.10432226, ..., -0.40111246,\n","         0.30454889,  0.40581767],\n","       [-0.2067291 , -0.42922774, -0.34298581, ...,  0.49071173,\n","         0.33887153,  0.58405928]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>avoidance_r</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2659 0.7168 ... 0.1785 -0.09063</div><input id='attrs-1718bd83-84cc-45af-9093-748a68fec59c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-1718bd83-84cc-45af-9093-748a68fec59c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a6a2110c-7033-4eea-abc9-4fcf8b05c12c' class='xr-var-data-in' type='checkbox'><label for='data-a6a2110c-7033-4eea-abc9-4fcf8b05c12c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.26593503,  0.71680617,  0.27858611, ...,  0.02299689,\n","         0.01451107,  0.09067214],\n","       [-0.1058495 , -0.17090847, -0.3889005 , ..., -0.29899644,\n","        -0.72744659, -0.17061327],\n","       [-0.0217773 ,  0.00321363,  0.28690616, ..., -0.16215494,\n","        -0.19671052, -0.18337224],\n","       [-0.13224492,  0.09047397, -0.09957962, ...,  0.10193614,\n","         0.17853907, -0.09063227]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>1|Site_sigma</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2501 0.1936 ... 0.9462 0.9701</div><input id='attrs-6bf1d961-c31f-404f-8c3d-c90a47cf3ad5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6bf1d961-c31f-404f-8c3d-c90a47cf3ad5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-76c1d330-da67-4ce0-9350-2d46acdefb32' class='xr-var-data-in' type='checkbox'><label for='data-76c1d330-da67-4ce0-9350-2d46acdefb32' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.2501237 , 0.19360377, 0.35071944, ..., 1.38409841, 1.39399561,\n","        0.550237  ],\n","       [0.43831707, 0.31180262, 0.49017289, ..., 0.73198453, 0.79655602,\n","        0.41956782],\n","       [0.36178054, 0.5533908 , 0.33368728, ..., 0.68548897, 0.25955799,\n","        0.54541755],\n","       [0.35164723, 0.96194603, 0.59841705, ..., 0.57220404, 0.94620629,\n","        0.97012793]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>avoidance_r|Site_sigma</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2631 1.035 ... 0.1903 0.4568</div><input id='attrs-7e1f98d5-8210-41aa-8a58-612e0ecbe681' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7e1f98d5-8210-41aa-8a58-612e0ecbe681' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2c58c50e-6f1f-498d-b483-242e83be9aa1' class='xr-var-data-in' type='checkbox'><label for='data-2c58c50e-6f1f-498d-b483-242e83be9aa1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.26312841, 1.03460963, 0.23387368, ..., 0.30141521, 0.32823392,\n","        0.20735774],\n","       [0.21003558, 0.21489849, 0.45861252, ..., 0.48048235, 0.92689632,\n","        0.49801202],\n","       [0.31863904, 0.02042477, 0.23874192, ..., 0.09094108, 0.02948519,\n","        0.05568832],\n","       [0.34513367, 0.18998309, 0.07018655, ..., 0.06258291, 0.19028222,\n","        0.45675646]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>1|Site</span></div><div class='xr-var-dims'>(chain, draw, Site__factor_dim)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2677 -0.03676 ... -1.097 -0.7999</div><input id='attrs-e27f917c-0ef1-4415-b3fb-45b1e5b4180e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e27f917c-0ef1-4415-b3fb-45b1e5b4180e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1fd05505-2127-4b39-9353-06bd22af5a71' class='xr-var-data-in' type='checkbox'><label for='data-1fd05505-2127-4b39-9353-06bd22af5a71' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[ 0.26765025, -0.03676199,  0.11366981, -0.43781721,\n","          0.09659445],\n","        [ 0.35093826,  0.42648461, -0.20929473, -0.04619555,\n","         -0.08117133],\n","        [-0.06519057, -0.12894764,  1.02726159, -0.67766992,\n","         -0.23213891],\n","        ...,\n","        [ 0.05184218,  0.19819221,  0.99808189, -0.83814782,\n","         -0.44351937],\n","        [ 0.05272128,  0.10622096,  0.94882174, -0.90537761,\n","         -0.49441925],\n","        [ 0.468914  ,  0.5148925 , -0.24301779, -0.43211385,\n","         -0.12416902]],\n","\n","       [[ 0.11292626,  0.31943865,  0.93223043, -0.56920042,\n","         -0.09226257],\n","        [ 0.6143356 ,  0.30236161,  0.69289195, -0.56211189,\n","         -0.04038681],\n","        [ 0.21571495,  0.17750893, -0.48928653, -0.51682674,\n","          0.20049426],\n","...\n","        [ 0.85656382,  0.02725986,  1.27020709,  0.3130623 ,\n","          0.25111566],\n","        [-0.0877241 ,  0.25590904, -0.19958011, -0.60111955,\n","         -0.53225714],\n","        [ 0.03495085,  0.39847907, -0.37872845, -0.94900136,\n","         -0.32768727]],\n","\n","       [[ 0.39383471,  0.89995955, -0.1692577 , -0.0463447 ,\n","          0.08150314],\n","        [ 1.16642632,  0.83949859, -0.61928022, -0.28698126,\n","          0.28336789],\n","        [ 0.8079447 ,  0.55303431,  0.34031343,  0.03203763,\n","          0.29582905],\n","        ...,\n","        [ 0.00479251,  0.03877179, -0.35018199, -1.0493117 ,\n","         -0.82145565],\n","        [ 0.44183773,  0.27105889,  0.89766364, -0.88315321,\n","         -0.40549007],\n","        [-0.14496289, -0.08711663,  1.42481179, -1.0971984 ,\n","         -0.79989427]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>avoidance_r|Site</span></div><div class='xr-var-dims'>(chain, draw, Site__factor_dim)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.08791 -0.7141 ... 0.29 -0.2368</div><input id='attrs-45380608-456d-4240-b2fb-836d07170a78' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-45380608-456d-4240-b2fb-836d07170a78' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9cfbdc4b-afd5-4519-bc76-66f8454ce681' class='xr-var-data-in' type='checkbox'><label for='data-9cfbdc4b-afd5-4519-bc76-66f8454ce681' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[-8.79086442e-02, -7.14104320e-01, -2.31505773e-01,\n","         -3.58081837e-01, -5.30299504e-02],\n","        [-5.63013829e-01,  7.73773802e-01,  1.97391408e-01,\n","         -9.39722327e-01, -7.67008889e-01],\n","        [-1.00301320e-01, -5.14766526e-01, -2.06476752e-01,\n","         -4.25613103e-01, -1.19502698e-01],\n","        ...,\n","        [-6.28566926e-02,  8.49015802e-02, -4.35683409e-01,\n","         -6.53280877e-02,  2.03902282e-01],\n","        [-6.43962024e-02,  7.09272718e-02, -4.77700426e-01,\n","         -6.18880290e-02,  2.19476823e-01],\n","        [ 6.74678530e-04, -1.76968536e-01, -1.72044286e-01,\n","         -2.19704420e-01, -1.37719703e-01]],\n","\n","       [[ 5.25268974e-02,  3.84962855e-04,  6.71415887e-03,\n","          1.46762028e-01,  2.81909258e-03],\n","        [ 1.86068678e-01,  2.14594355e-01, -8.23209744e-02,\n","          1.55358890e-01,  4.69000928e-02],\n","        [ 3.84125432e-01,  1.38364147e-01,  4.17263354e-01,\n","         -3.80693542e-04,  6.66587054e-01],\n","...\n","        [ 2.28925633e-02, -5.99768238e-02,  4.39292345e-02,\n","         -1.76109503e-01,  1.01124102e-03],\n","        [-1.48176094e-02,  3.92732075e-04, -8.69331122e-03,\n","          2.96880722e-03, -4.65466458e-03],\n","        [-5.15288047e-02,  6.86609266e-03, -5.17813054e-02,\n","         -1.93316150e-02, -4.57437239e-02]],\n","\n","       [[ 2.29363738e-01, -2.49000254e-01,  4.37709519e-01,\n","          2.74544794e-01,  1.16714146e-01],\n","        [-2.17191786e-02, -3.66426432e-02,  3.52469148e-01,\n","         -1.52700355e-01, -1.29012848e-02],\n","        [ 4.46171894e-02,  9.96099336e-02,  1.28678712e-01,\n","         -1.14439319e-02,  7.11627059e-02],\n","        ...,\n","        [ 2.81871292e-03,  3.87830255e-02,  3.53125533e-02,\n","         -2.97875062e-02,  1.65927409e-02],\n","        [-7.03093089e-02, -7.36976994e-02, -9.54025695e-02,\n","         -3.18843860e-01,  1.13462861e-01],\n","        [ 8.11961100e-02,  1.05063016e-01,  5.08770268e-01,\n","          2.90043669e-01, -2.36844214e-01]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>romantic_mean</span></div><div class='xr-var-dims'>(chain, draw, romantic_obs)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.496 0.4293 ... 0.3255 0.4208</div><input id='attrs-4b09d7bb-dbda-4620-b21e-0a7db1303bc5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4b09d7bb-dbda-4620-b21e-0a7db1303bc5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8c880d61-5e78-4bfc-8e75-0ff0c4669e93' class='xr-var-data-in' type='checkbox'><label for='data-8c880d61-5e78-4bfc-8e75-0ff0c4669e93' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[0.49598514, 0.42926655, 0.53957954, ..., 0.46747271,\n","         0.42926655, 0.53790972],\n","        [0.39983484, 0.41513572, 0.38999109, ..., 0.4063157 ,\n","         0.41513572, 0.3903681 ],\n","        [0.34667598, 0.38982051, 0.3198779 , ..., 0.36475244,\n","         0.38982051, 0.32088829],\n","        ...,\n","        [0.78806436, 0.86227293, 0.7260447 , ..., 0.82269621,\n","         0.86227293, 0.72862778],\n","        [0.60431622, 0.61927222, 0.59448715, ..., 0.61069818,\n","         0.61927222, 0.59486665],\n","        [0.40066651, 0.44033798, 0.37552819, ..., 0.41739972,\n","         0.44033798, 0.37648369]],\n","\n","       [[0.53263158, 0.56482902, 0.5115393 , ..., 0.54636459,\n","         0.56482902, 0.51235178],\n","        [0.5100072 , 0.54898981, 0.48457312, ..., 0.52661741,\n","         0.54898981, 0.48555072],\n","        [0.35697514, 0.47575284, 0.28741719, ..., 0.40621133,\n","         0.47575284, 0.28994009],\n","...\n","        [0.70007167, 0.73044757, 0.67931447, ..., 0.71321962,\n","         0.73044757, 0.68012679],\n","        [0.54449124, 0.60956474, 0.50121424, ..., 0.57246893,\n","         0.60956474, 0.50288325],\n","        [0.35893946, 0.41968555, 0.3216261 , ..., 0.38432985,\n","         0.41968555, 0.32302355]],\n","\n","       [[0.46803255, 0.47291717, 0.46486077, ..., 0.47010782,\n","         0.47291717, 0.46498271],\n","        [0.46710208, 0.44282257, 0.48297511, ..., 0.45675746,\n","         0.44282257, 0.48236376],\n","        [0.41797383, 0.45241107, 0.39598983, ..., 0.43253217,\n","         0.45241107, 0.39682824],\n","        ...,\n","        [0.54126529, 0.49804159, 0.56907146, ..., 0.5229332 ,\n","         0.49804159, 0.56800886],\n","        [0.69004949, 0.66009437, 0.70871762, ..., 0.67749432,\n","         0.66009437, 0.70801195],\n","        [0.38297256, 0.32548021, 0.42230623, ..., 0.35802568,\n","         0.32548021, 0.42077154]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-fe8f71fd-09ea-4c9a-ba9a-364cacc13a40' class='xr-section-summary-in' type='checkbox'  checked><label for='section-fe8f71fd-09ea-4c9a-ba9a-364cacc13a40' class='xr-section-summary' >Attributes: <span>(8)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:45:38.244273</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>110.27536106109619</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_posterior_predictive7a22494f-8d99-4982-83a7-2de03c139d8d\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_posterior_predictive7a22494f-8d99-4982-83a7-2de03c139d8d\" class = \"xr-section-summary\">posterior_predictive</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:       (chain: 4, draw: 5000, romantic_obs: 407)\n","Coordinates:\n","  * chain         (chain) int64 0 1 2 3\n","  * draw          (draw) int64 0 1 2 3 4 5 6 ... 4994 4995 4996 4997 4998 4999\n","  * romantic_obs  (romantic_obs) int64 0 1 2 3 4 5 6 ... 401 402 403 404 405 406\n","Data variables:\n","    romantic      (chain, draw, romantic_obs) int64 1 1 1 0 0 1 ... 0 0 1 0 0 1\n","Attributes:\n","    modeling_interface:          bambi\n","    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-534a9fbf-8087-4787-b6d6-f5d948558dc6' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-534a9fbf-8087-4787-b6d6-f5d948558dc6' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>romantic_obs</span>: 407</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-fac3578c-f715-48c4-8383-bb4b69132b47' class='xr-section-summary-in' type='checkbox'  checked><label for='section-fac3578c-f715-48c4-8383-bb4b69132b47' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-0c9f18a1-46e1-4b36-b5f3-db143d8bdda7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0c9f18a1-46e1-4b36-b5f3-db143d8bdda7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-64c1e3ec-7558-49bf-9813-a232f5dbb6d7' class='xr-var-data-in' type='checkbox'><label for='data-64c1e3ec-7558-49bf-9813-a232f5dbb6d7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-891705d8-422a-4ed0-993b-a19d9d909d23' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-891705d8-422a-4ed0-993b-a19d9d909d23' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b2a52bfa-9e34-43f2-bace-8bb70c937148' class='xr-var-data-in' type='checkbox'><label for='data-b2a52bfa-9e34-43f2-bace-8bb70c937148' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>romantic_obs</span></div><div class='xr-var-dims'>(romantic_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 402 403 404 405 406</div><input id='attrs-0edabdbc-49c0-4b07-b84d-f4e01319bd18' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0edabdbc-49c0-4b07-b84d-f4e01319bd18' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-963190ae-1106-46fe-a07c-5fa38f574d3e' class='xr-var-data-in' type='checkbox'><label for='data-963190ae-1106-46fe-a07c-5fa38f574d3e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 404, 405, 406])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-f50d2707-0d5f-438d-aaad-a77ebd11931a' class='xr-section-summary-in' type='checkbox'  checked><label for='section-f50d2707-0d5f-438d-aaad-a77ebd11931a' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>romantic</span></div><div class='xr-var-dims'>(chain, draw, romantic_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 1 1 0 0 1 1 0 ... 0 0 0 0 1 0 0 1</div><input id='attrs-c999416b-b004-42bc-9c6b-77de1e70a542' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c999416b-b004-42bc-9c6b-77de1e70a542' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ba343416-2233-45f3-ac15-1be7d0e8b150' class='xr-var-data-in' type='checkbox'><label for='data-ba343416-2233-45f3-ac15-1be7d0e8b150' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[1, 1, 1, ..., 0, 1, 0],\n","        [0, 0, 1, ..., 0, 1, 0],\n","        [0, 0, 1, ..., 1, 0, 1],\n","        ...,\n","        [1, 1, 1, ..., 1, 1, 0],\n","        [1, 1, 1, ..., 0, 1, 1],\n","        [1, 1, 0, ..., 0, 0, 1]],\n","\n","       [[1, 1, 1, ..., 1, 0, 1],\n","        [0, 0, 0, ..., 0, 1, 1],\n","        [1, 1, 0, ..., 1, 1, 0],\n","        ...,\n","        [0, 1, 1, ..., 0, 0, 0],\n","        [1, 1, 1, ..., 0, 1, 1],\n","        [1, 0, 0, ..., 1, 0, 0]],\n","\n","       [[1, 1, 0, ..., 0, 1, 0],\n","        [0, 1, 1, ..., 0, 1, 0],\n","        [1, 1, 1, ..., 0, 0, 0],\n","        ...,\n","        [0, 1, 1, ..., 0, 0, 1],\n","        [1, 1, 1, ..., 0, 1, 1],\n","        [1, 0, 1, ..., 0, 1, 1]],\n","\n","       [[1, 1, 0, ..., 1, 1, 1],\n","        [1, 1, 1, ..., 0, 1, 1],\n","        [1, 1, 0, ..., 1, 0, 0],\n","        ...,\n","        [1, 1, 1, ..., 1, 0, 0],\n","        [1, 0, 0, ..., 0, 0, 0],\n","        [0, 0, 1, ..., 0, 0, 1]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-4dbe816f-e4d6-44db-b2f0-b42624c70f04' class='xr-section-summary-in' type='checkbox'  checked><label for='section-4dbe816f-e4d6-44db-b2f0-b42624c70f04' class='xr-section-summary' >Attributes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_sample_statsde65e8f7-cec5-4731-8c00-a29f25a94318\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_sample_statsde65e8f7-cec5-4731-8c00-a29f25a94318\" class = \"xr-section-summary\">sample_stats</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:                (chain: 4, draw: 5000)\n","Coordinates:\n","  * chain                  (chain) int64 0 1 2 3\n","  * draw                   (draw) int64 0 1 2 3 4 5 ... 4995 4996 4997 4998 4999\n","Data variables: (12/17)\n","    step_size_bar          (chain, draw) float64 0.05385 0.05385 ... 0.0524\n","    perf_counter_start     (chain, draw) float64 2.604e+03 ... 2.695e+03\n","    largest_eigval         (chain, draw) float64 nan nan nan nan ... nan nan nan\n","    lp                     (chain, draw) float64 -300.6 -304.8 ... -289.1 -293.8\n","    max_energy_error       (chain, draw) float64 -0.2429 -0.1253 ... 0.01828\n","    diverging              (chain, draw) bool False False False ... False False\n","    ...                     ...\n","    energy                 (chain, draw) float64 310.7 314.8 ... 299.6 297.8\n","    perf_counter_diff      (chain, draw) float64 0.01319 0.01297 ... 0.01275\n","    n_steps                (chain, draw) float64 63.0 63.0 63.0 ... 95.0 63.0\n","    process_time_diff      (chain, draw) float64 0.01319 0.01297 ... 0.01276\n","    step_size              (chain, draw) float64 0.05117 0.05117 ... 0.05743\n","    reached_max_treedepth  (chain, draw) bool False False False ... False False\n","Attributes:\n","    created_at:                  2023-12-19T07:45:38.287440\n","    arviz_version:               0.16.0\n","    inference_library:           pymc\n","    inference_library_version:   5.6.0\n","    sampling_time:               110.27536106109619\n","    tuning_steps:                1000\n","    modeling_interface:          bambi\n","    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-5a474add-c27d-40d0-9927-63a805827d04' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-5a474add-c27d-40d0-9927-63a805827d04' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-acd7d79a-cbbe-4de5-bdc7-20434907783f' class='xr-section-summary-in' type='checkbox'  checked><label for='section-acd7d79a-cbbe-4de5-bdc7-20434907783f' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-932faf09-7b57-4c26-9d53-ab1b0cb9320d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-932faf09-7b57-4c26-9d53-ab1b0cb9320d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-59dff09e-b43f-442d-96fb-3b0c269c25be' class='xr-var-data-in' type='checkbox'><label for='data-59dff09e-b43f-442d-96fb-3b0c269c25be' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-69961e2a-b28e-40c7-bbe0-3a19fee36190' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-69961e2a-b28e-40c7-bbe0-3a19fee36190' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a87b4995-e33f-4174-bf8b-44b8d4c3d5f3' class='xr-var-data-in' type='checkbox'><label for='data-a87b4995-e33f-4174-bf8b-44b8d4c3d5f3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-62732340-06a9-42e9-8c3c-c96eb62c1805' class='xr-section-summary-in' type='checkbox'  ><label for='section-62732340-06a9-42e9-8c3c-c96eb62c1805' class='xr-section-summary' >Data variables: <span>(17)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>step_size_bar</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.05385 0.05385 ... 0.0524 0.0524</div><input id='attrs-cdc563bf-5478-4dfd-b3e5-33740626ac1e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-cdc563bf-5478-4dfd-b3e5-33740626ac1e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5d314bb3-0f0c-40bb-b992-504753af2571' class='xr-var-data-in' type='checkbox'><label for='data-5d314bb3-0f0c-40bb-b992-504753af2571' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.05384587, 0.05384587, 0.05384587, ..., 0.05384587, 0.05384587,\n","        0.05384587],\n","       [0.05484667, 0.05484667, 0.05484667, ..., 0.05484667, 0.05484667,\n","        0.05484667],\n","       [0.05842077, 0.05842077, 0.05842077, ..., 0.05842077, 0.05842077,\n","        0.05842077],\n","       [0.05239575, 0.05239575, 0.05239575, ..., 0.05239575, 0.05239575,\n","        0.05239575]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_start</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.604e+03 2.604e+03 ... 2.695e+03</div><input id='attrs-f76a1c99-5b7d-48ad-9c0a-d9355e46e814' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f76a1c99-5b7d-48ad-9c0a-d9355e46e814' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0204406c-76d9-4fc1-9214-fdabf8fa0357' class='xr-var-data-in' type='checkbox'><label for='data-0204406c-76d9-4fc1-9214-fdabf8fa0357' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[2604.40591232, 2604.41932778, 2604.43254112, ..., 2687.4303682 ,\n","        2687.44333178, 2687.46869526],\n","       [2602.04662809, 2602.07378882, 2602.08867484, ..., 2690.938726  ,\n","        2690.96524485, 2690.98043476],\n","       [2603.70906116, 2603.72219391, 2603.73510672, ..., 2688.19375898,\n","        2688.21024092, 2688.24492112],\n","       [2604.2842416 , 2604.31482924, 2604.33233995, ..., 2694.65922636,\n","        2694.67239233, 2694.69162413]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>largest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-cac4ddfc-f1b9-4a8f-ab3e-1d6fdbc9b805' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-cac4ddfc-f1b9-4a8f-ab3e-1d6fdbc9b805' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c67eb196-8ed2-4e89-9a00-d41b0457eb61' class='xr-var-data-in' type='checkbox'><label for='data-c67eb196-8ed2-4e89-9a00-d41b0457eb61' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lp</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-300.6 -304.8 ... -289.1 -293.8</div><input id='attrs-66b7237c-b582-4301-8e77-523ea99c3aad' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-66b7237c-b582-4301-8e77-523ea99c3aad' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ef27fa4c-c85d-42cf-8ea0-7b7002cb2a57' class='xr-var-data-in' type='checkbox'><label for='data-ef27fa4c-c85d-42cf-8ea0-7b7002cb2a57' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-300.58005736, -304.846539  , -303.31725712, ..., -287.83351974,\n","        -287.68440427, -291.35218766],\n","       [-294.32636178, -296.55169304, -296.11235345, ..., -290.65603281,\n","        -289.06899821, -291.84853809],\n","       [-293.43581876, -300.33099351, -299.45467641, ..., -300.30042677,\n","        -301.3740293 , -296.14291996],\n","       [-300.09343201, -294.51818637, -295.49557289, ..., -293.50588749,\n","        -289.10125338, -293.81242915]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>max_energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.2429 -0.1253 ... 0.01828</div><input id='attrs-2d31151f-c646-4d7a-abab-7458d47be2ad' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2d31151f-c646-4d7a-abab-7458d47be2ad' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bb865322-3e3e-4906-a047-5d11fc7350a3' class='xr-var-data-in' type='checkbox'><label for='data-bb865322-3e3e-4906-a047-5d11fc7350a3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.24294039, -0.12528583,  0.07935867, ..., -0.01932131,\n","         0.05932985,  0.02484814],\n","       [-0.12524393, -0.04607292,  0.0151342 , ..., -0.12915389,\n","        -0.1754288 , -0.11482024],\n","       [-0.01916125,  0.02668119,  0.02620383, ..., -0.16196266,\n","         0.07599891, -0.07241695],\n","       [-0.01840055, -0.0249473 , -0.03120994, ..., -0.02693748,\n","        -0.06945341,  0.01827938]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>diverging</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-4db87d83-7e19-4d33-869e-0b25b196e5e9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4db87d83-7e19-4d33-869e-0b25b196e5e9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f1c96e1f-5f71-42a8-bdc1-2eed2e07db86' class='xr-var-data-in' type='checkbox'><label for='data-f1c96e1f-5f71-42a8-bdc1-2eed2e07db86' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>index_in_trajectory</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>-10 -48 40 19 -34 ... 40 12 47 -21</div><input id='attrs-c94de176-5980-445a-8c03-15cd37886412' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c94de176-5980-445a-8c03-15cd37886412' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3780af73-db37-48dd-be32-5a4babc9362d' class='xr-var-data-in' type='checkbox'><label for='data-3780af73-db37-48dd-be32-5a4babc9362d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-10, -48,  40, ..., -31,   1,  27],\n","       [-11, -18,  37, ...,  23,  37, -77],\n","       [ -1, -46,  54, ...,  30,  54, -15],\n","       [-30, -25,  20, ...,  12,  47, -21]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>acceptance_rate</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.9802 0.9941 ... 0.9971 0.9952</div><input id='attrs-20640e67-e61e-468c-93e1-78554c95f6a6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-20640e67-e61e-468c-93e1-78554c95f6a6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0f9c71ab-f3a2-46c3-859e-354ebe03379b' class='xr-var-data-in' type='checkbox'><label for='data-0f9c71ab-f3a2-46c3-859e-354ebe03379b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.98017824, 0.99410342, 0.9766556 , ..., 0.99951095, 0.98160363,\n","        0.98856524],\n","       [0.99038648, 0.99975351, 0.99664201, ..., 0.99381972, 0.97063884,\n","        0.98135874],\n","       [0.99760482, 0.98691976, 0.99323142, ..., 0.996384  , 0.97660688,\n","        0.99779975],\n","       [0.99828243, 0.9996027 , 0.99863983, ..., 0.99959808, 0.99708138,\n","        0.99519665]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smallest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-678b85d1-7294-4850-9957-095eacae496a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-678b85d1-7294-4850-9957-095eacae496a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7967f60e-6a75-46f6-bbc2-147da28f4903' class='xr-var-data-in' type='checkbox'><label for='data-7967f60e-6a75-46f6-bbc2-147da28f4903' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan],\n","       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.01398 -0.08254 ... 0.01307</div><input id='attrs-30391f15-9fd5-4702-9a6f-80b8973c6051' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-30391f15-9fd5-4702-9a6f-80b8973c6051' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-468ea75a-5576-400b-a30a-d676397538cd' class='xr-var-data-in' type='checkbox'><label for='data-468ea75a-5576-400b-a30a-d676397538cd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.01397619, -0.08254369,  0.02199584, ..., -0.00833996,\n","        -0.00171067,  0.01384572],\n","       [ 0.0158455 , -0.00461273, -0.00453449, ...,  0.01573354,\n","        -0.07497912,  0.0307655 ],\n","       [ 0.00010271,  0.01214871, -0.0120604 , ..., -0.01221336,\n","         0.02951682, -0.01542803],\n","       [-0.0046255 , -0.0185283 , -0.00462197, ..., -0.00355517,\n","        -0.02990866,  0.01307176]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tree_depth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>6 6 6 5 7 6 6 6 ... 6 6 6 6 6 6 7 6</div><input id='attrs-7108040a-daf0-442a-848d-30c1537d2a54' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7108040a-daf0-442a-848d-30c1537d2a54' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9a2f1001-7032-47d8-9e84-b95226f9ba12' class='xr-var-data-in' type='checkbox'><label for='data-9a2f1001-7032-47d8-9e84-b95226f9ba12' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[6, 6, 6, ..., 6, 7, 6],\n","       [7, 6, 6, ..., 7, 6, 7],\n","       [6, 6, 6, ..., 6, 7, 6],\n","       [6, 6, 6, ..., 6, 7, 6]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>310.7 314.8 313.7 ... 299.6 297.8</div><input id='attrs-7c4e71cb-1ef4-4329-9097-84e4ba357ad1' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7c4e71cb-1ef4-4329-9097-84e4ba357ad1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-28773791-f6b9-4fdd-8e30-041167b5388d' class='xr-var-data-in' type='checkbox'><label for='data-28773791-f6b9-4fdd-8e30-041167b5388d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[310.74615539, 314.82044369, 313.71699425, ..., 294.01320518,\n","        293.38167985, 295.66772749],\n","       [300.37778086, 301.85186652, 304.30540824, ..., 295.10162291,\n","        299.3193817 , 296.23818961],\n","       [303.46356679, 305.98773993, 310.18657809, ..., 311.37055396,\n","        308.97089771, 307.9737215 ],\n","       [305.2651457 , 306.66020309, 301.11344611, ..., 297.38252175,\n","        299.5604006 , 297.83657573]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.01319 0.01297 ... 0.01892 0.01275</div><input id='attrs-21e2b115-9f28-42a0-b665-7731f8d216c2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-21e2b115-9f28-42a0-b665-7731f8d216c2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-763b1877-cb95-4d0b-b33d-a35dd2e24f2c' class='xr-var-data-in' type='checkbox'><label for='data-763b1877-cb95-4d0b-b33d-a35dd2e24f2c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.01318953, 0.01297346, 0.01286071, ..., 0.01273907, 0.02512312,\n","        0.01274174],\n","       [0.02691741, 0.01468914, 0.02359563, ..., 0.02625968, 0.01492511,\n","        0.02633632],\n","       [0.01284256, 0.01269446, 0.01284065, ..., 0.01615119, 0.03446116,\n","        0.01290664],\n","       [0.0300221 , 0.01729865, 0.01268464, ..., 0.01286357, 0.01891835,\n","        0.01275444]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>n_steps</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>63.0 63.0 63.0 ... 63.0 95.0 63.0</div><input id='attrs-c20ae919-f6b8-4b7c-8e00-bc0a3355fbbf' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c20ae919-f6b8-4b7c-8e00-bc0a3355fbbf' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-28a7d63e-44b3-4c39-bc17-f46ca2ed22aa' class='xr-var-data-in' type='checkbox'><label for='data-28a7d63e-44b3-4c39-bc17-f46ca2ed22aa' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 63.,  63.,  63., ...,  63., 127.,  63.],\n","       [127.,  63.,  63., ..., 127.,  63., 127.],\n","       [ 63.,  63.,  63., ...,  63., 127.,  63.],\n","       [ 63.,  63.,  63., ...,  63.,  95.,  63.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>process_time_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.01319 0.01297 ... 0.01892 0.01276</div><input id='attrs-fb889ca1-6062-46a6-b203-fcad919d6c2e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-fb889ca1-6062-46a6-b203-fcad919d6c2e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7dd6d639-54c1-4845-9c9e-6d6353a2e7c1' class='xr-var-data-in' type='checkbox'><label for='data-7dd6d639-54c1-4845-9c9e-6d6353a2e7c1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.01318957, 0.01297385, 0.01286068, ..., 0.0127391 , 0.02512353,\n","        0.01274256],\n","       [0.0269177 , 0.01468926, 0.01360001, ..., 0.02625987, 0.01492622,\n","        0.02633741],\n","       [0.01284267, 0.01269475, 0.01284111, ..., 0.01615165, 0.03344663,\n","        0.01290656],\n","       [0.01701457, 0.01729866, 0.01268434, ..., 0.01286447, 0.01891943,\n","        0.01275534]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.05117 0.05117 ... 0.05743 0.05743</div><input id='attrs-394aeb54-0bd8-4865-abe8-d01eb6a619da' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-394aeb54-0bd8-4865-abe8-d01eb6a619da' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-78e3eca0-f7b0-43f8-bdb7-b27c6767f70e' class='xr-var-data-in' type='checkbox'><label for='data-78e3eca0-f7b0-43f8-bdb7-b27c6767f70e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.05116865, 0.05116865, 0.05116865, ..., 0.05116865, 0.05116865,\n","        0.05116865],\n","       [0.05313998, 0.05313998, 0.05313998, ..., 0.05313998, 0.05313998,\n","        0.05313998],\n","       [0.06188026, 0.06188026, 0.06188026, ..., 0.06188026, 0.06188026,\n","        0.06188026],\n","       [0.05742958, 0.05742958, 0.05742958, ..., 0.05742958, 0.05742958,\n","        0.05742958]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>reached_max_treedepth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-e6963610-83d8-4fbc-8fa8-49d7c7a30a5a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e6963610-83d8-4fbc-8fa8-49d7c7a30a5a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-586062e4-3c81-49b0-a568-1afd3d744584' class='xr-var-data-in' type='checkbox'><label for='data-586062e4-3c81-49b0-a568-1afd3d744584' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False],\n","       [False, False, False, ..., False, False, False]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-6cffcd9c-8876-490b-bc23-55a7bf85c122' class='xr-section-summary-in' type='checkbox'  checked><label for='section-6cffcd9c-8876-490b-bc23-55a7bf85c122' class='xr-section-summary' >Attributes: <span>(8)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:45:38.287440</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>sampling_time :</span></dt><dd>110.27536106109619</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","            <li class = \"xr-section-item\">\n","                  <input id=\"idata_observed_data082d93e4-98e0-4fe3-8b40-3013ba0301f8\" class=\"xr-section-summary-in\" type=\"checkbox\">\n","                  <label for=\"idata_observed_data082d93e4-98e0-4fe3-8b40-3013ba0301f8\" class = \"xr-section-summary\">observed_data</label>\n","                  <div class=\"xr-section-inline-details\"></div>\n","                  <div class=\"xr-section-details\">\n","                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n","                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n","<defs>\n","<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n","<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n","<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n","</symbol>\n","<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n","<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n","<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n","</symbol>\n","</defs>\n","</svg>\n","<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body[data-theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block !important;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt,\n",".xr-attrs dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n","</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n","Dimensions:       (romantic_obs: 407)\n","Coordinates:\n","  * romantic_obs  (romantic_obs) int64 0 1 2 3 4 5 6 ... 401 402 403 404 405 406\n","Data variables:\n","    romantic      (romantic_obs) int64 1 1 1 1 1 1 1 1 1 1 ... 0 1 0 0 1 1 1 1 1\n","Attributes:\n","    created_at:                  2023-12-19T07:45:38.295021\n","    arviz_version:               0.16.0\n","    inference_library:           pymc\n","    inference_library_version:   5.6.0\n","    modeling_interface:          bambi\n","    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-c7d5c1d0-1b77-46c3-babc-7d83306ce7d8' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-c7d5c1d0-1b77-46c3-babc-7d83306ce7d8' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>romantic_obs</span>: 407</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-260402f1-f259-472e-b5a1-e6c4ef7ec852' class='xr-section-summary-in' type='checkbox'  checked><label for='section-260402f1-f259-472e-b5a1-e6c4ef7ec852' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>romantic_obs</span></div><div class='xr-var-dims'>(romantic_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 402 403 404 405 406</div><input id='attrs-bf7bc989-015c-42e7-bcce-e31736a6915a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bf7bc989-015c-42e7-bcce-e31736a6915a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-99927903-9e48-4e08-aee3-56384ae56324' class='xr-var-data-in' type='checkbox'><label for='data-99927903-9e48-4e08-aee3-56384ae56324' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 404, 405, 406])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-90e07ac8-01eb-4c9e-aa92-4330254def62' class='xr-section-summary-in' type='checkbox'  checked><label for='section-90e07ac8-01eb-4c9e-aa92-4330254def62' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>romantic</span></div><div class='xr-var-dims'>(romantic_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 1 1 1 1 1 1 1 ... 1 0 0 1 1 1 1 1</div><input id='attrs-7da3005b-b497-4cca-8e58-56c634d0aeca' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7da3005b-b497-4cca-8e58-56c634d0aeca' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-403b8478-0282-4b5a-89dd-66a4b82dd35e' class='xr-var-data-in' type='checkbox'><label for='data-403b8478-0282-4b5a-89dd-66a4b82dd35e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1,\n","       1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0,\n","       0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1,\n","       1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0,\n","       0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1,\n","       1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1,\n","       0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1,\n","       0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0,\n","       1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0,\n","       0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1,\n","       0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0,\n","       0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0,\n","       0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0,\n","       0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0,\n","       1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0,\n","       1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1,\n","       0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0,\n","       0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0,\n","       0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-0dc8d625-af56-4107-8942-ae86aacea322' class='xr-section-summary-in' type='checkbox'  checked><label for='section-0dc8d625-af56-4107-8942-ae86aacea322' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2023-12-19T07:45:38.295021</dd><dt><span>arviz_version :</span></dt><dd>0.16.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.6.0</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n","                      </ul>\n","                  </div>\n","            </li>\n","            \n","              </ul>\n","            </div>\n","            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n"," *\n"," */\n","\n",":root {\n","  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n","  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n","  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n","  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n","  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n","  --xr-background-color: var(--jp-layout-color0, white);\n","  --xr-background-color-row-even: var(--jp-layout-color1, white);\n","  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n","}\n","\n","html[theme=dark],\n","body.vscode-dark {\n","  --xr-font-color0: rgba(255, 255, 255, 1);\n","  --xr-font-color2: rgba(255, 255, 255, 0.54);\n","  --xr-font-color3: rgba(255, 255, 255, 0.38);\n","  --xr-border-color: #1F1F1F;\n","  --xr-disabled-color: #515151;\n","  --xr-background-color: #111111;\n","  --xr-background-color-row-even: #111111;\n","  --xr-background-color-row-odd: #313131;\n","}\n","\n",".xr-wrap {\n","  display: block;\n","  min-width: 300px;\n","  max-width: 700px;\n","}\n","\n",".xr-text-repr-fallback {\n","  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n","  display: none;\n","}\n","\n",".xr-header {\n","  padding-top: 6px;\n","  padding-bottom: 6px;\n","  margin-bottom: 4px;\n","  border-bottom: solid 1px var(--xr-border-color);\n","}\n","\n",".xr-header > div,\n",".xr-header > ul {\n","  display: inline;\n","  margin-top: 0;\n","  margin-bottom: 0;\n","}\n","\n",".xr-obj-type,\n",".xr-array-name {\n","  margin-left: 2px;\n","  margin-right: 10px;\n","}\n","\n",".xr-obj-type {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-sections {\n","  padding-left: 0 !important;\n","  display: grid;\n","  grid-template-columns: 150px auto auto 1fr 20px 20px;\n","}\n","\n",".xr-sections.group-sections {\n","  grid-template-columns: auto;\n","}\n","\n",".xr-section-item {\n","  display: contents;\n","}\n","\n",".xr-section-item input {\n","  display: none;\n","}\n","\n",".xr-section-item input + label {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-item input:enabled + label {\n","  cursor: pointer;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-item input:enabled + label:hover {\n","  color: var(--xr-font-color0);\n","}\n","\n",".xr-section-summary {\n","  grid-column: 1;\n","  color: var(--xr-font-color2);\n","  font-weight: 500;\n","}\n","\n",".xr-section-summary > span {\n","  display: inline-block;\n","  padding-left: 0.5em;\n","}\n","\n",".xr-section-summary-in:disabled + label {\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-section-summary-in + label:before {\n","  display: inline-block;\n","  content: '►';\n","  font-size: 11px;\n","  width: 15px;\n","  text-align: center;\n","}\n","\n",".xr-section-summary-in:disabled + label:before {\n","  color: var(--xr-disabled-color);\n","}\n","\n",".xr-section-summary-in:checked + label:before {\n","  content: '▼';\n","}\n","\n",".xr-section-summary-in:checked + label > span {\n","  display: none;\n","}\n","\n",".xr-section-summary,\n",".xr-section-inline-details {\n","  padding-top: 4px;\n","  padding-bottom: 4px;\n","}\n","\n",".xr-section-inline-details {\n","  grid-column: 2 / -1;\n","}\n","\n",".xr-section-details {\n","  display: none;\n","  grid-column: 1 / -1;\n","  margin-bottom: 5px;\n","}\n","\n",".xr-section-summary-in:checked ~ .xr-section-details {\n","  display: contents;\n","}\n","\n",".xr-array-wrap {\n","  grid-column: 1 / -1;\n","  display: grid;\n","  grid-template-columns: 20px auto;\n","}\n","\n",".xr-array-wrap > label {\n","  grid-column: 1;\n","  vertical-align: top;\n","}\n","\n",".xr-preview {\n","  color: var(--xr-font-color3);\n","}\n","\n",".xr-array-preview,\n",".xr-array-data {\n","  padding: 0 5px !important;\n","  grid-column: 2;\n","}\n","\n",".xr-array-data,\n",".xr-array-in:checked ~ .xr-array-preview {\n","  display: none;\n","}\n","\n",".xr-array-in:checked ~ .xr-array-data,\n",".xr-array-preview {\n","  display: inline-block;\n","}\n","\n",".xr-dim-list {\n","  display: inline-block !important;\n","  list-style: none;\n","  padding: 0 !important;\n","  margin: 0;\n","}\n","\n",".xr-dim-list li {\n","  display: inline-block;\n","  padding: 0;\n","  margin: 0;\n","}\n","\n",".xr-dim-list:before {\n","  content: '(';\n","}\n","\n",".xr-dim-list:after {\n","  content: ')';\n","}\n","\n",".xr-dim-list li:not(:last-child):after {\n","  content: ',';\n","  padding-right: 5px;\n","}\n","\n",".xr-has-index {\n","  font-weight: bold;\n","}\n","\n",".xr-var-list,\n",".xr-var-item {\n","  display: contents;\n","}\n","\n",".xr-var-item > div,\n",".xr-var-item label,\n",".xr-var-item > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-even);\n","  margin-bottom: 0;\n","}\n","\n",".xr-var-item > .xr-var-name:hover span {\n","  padding-right: 5px;\n","}\n","\n",".xr-var-list > li:nth-child(odd) > div,\n",".xr-var-list > li:nth-child(odd) > label,\n",".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n","  background-color: var(--xr-background-color-row-odd);\n","}\n","\n",".xr-var-name {\n","  grid-column: 1;\n","}\n","\n",".xr-var-dims {\n","  grid-column: 2;\n","}\n","\n",".xr-var-dtype {\n","  grid-column: 3;\n","  text-align: right;\n","  color: var(--xr-font-color2);\n","}\n","\n",".xr-var-preview {\n","  grid-column: 4;\n","}\n","\n",".xr-var-name,\n",".xr-var-dims,\n",".xr-var-dtype,\n",".xr-preview,\n",".xr-attrs dt {\n","  white-space: nowrap;\n","  overflow: hidden;\n","  text-overflow: ellipsis;\n","  padding-right: 10px;\n","}\n","\n",".xr-var-name:hover,\n",".xr-var-dims:hover,\n",".xr-var-dtype:hover,\n",".xr-attrs dt:hover {\n","  overflow: visible;\n","  width: auto;\n","  z-index: 1;\n","}\n","\n",".xr-var-attrs,\n",".xr-var-data {\n","  display: none;\n","  background-color: var(--xr-background-color) !important;\n","  padding-bottom: 5px !important;\n","}\n","\n",".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",".xr-var-data-in:checked ~ .xr-var-data {\n","  display: block;\n","}\n","\n",".xr-var-data > table {\n","  float: right;\n","}\n","\n",".xr-var-name span,\n",".xr-var-data,\n",".xr-attrs {\n","  padding-left: 25px !important;\n","}\n","\n",".xr-attrs,\n",".xr-var-attrs,\n",".xr-var-data {\n","  grid-column: 1 / -1;\n","}\n","\n","dl.xr-attrs {\n","  padding: 0;\n","  margin: 0;\n","  display: grid;\n","  grid-template-columns: 125px auto;\n","}\n","\n",".xr-attrs dt, dd {\n","  padding: 0;\n","  margin: 0;\n","  float: left;\n","  padding-right: 10px;\n","  width: auto;\n","}\n","\n",".xr-attrs dt {\n","  font-weight: normal;\n","  grid-column: 1;\n","}\n","\n",".xr-attrs dt:hover span {\n","  display: inline-block;\n","  background: var(--xr-background-color);\n","  padding-right: 10px;\n","}\n","\n",".xr-attrs dd {\n","  grid-column: 2;\n","  white-space: pre-wrap;\n","  word-break: break-all;\n","}\n","\n",".xr-icon-database,\n",".xr-icon-file-text2 {\n","  display: inline-block;\n","  vertical-align: middle;\n","  width: 1em;\n","  height: 1.5em !important;\n","  stroke-width: 0;\n","  stroke: currentColor;\n","  fill: currentColor;\n","}\n",".xr-wrap{width:700px!important;} </style>"],"text/plain":["Inference data with groups:\n","\t> posterior\n","\t> posterior_predictive\n","\t> sample_stats\n","\t> observed_data"]},"execution_count":126,"metadata":{},"output_type":"execute_result"}],"source":["both_logit_bmb.predict(both_logit_trace,\n","                       kind=\"mean\",\n","                       data=new_group,\n","                       sample_new_groups=True,\n","                       inplace=False)"]},{"cell_type":"markdown","metadata":{"id":"C757AE522BA54AEC81D11DDA4F4BBAC1","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 补充：Pymc code for Hierarchical logistic regression  \n","\n","* 在这里，我们补充对于完全池化模型与变化斜率&截距模型的 pymc 代码，可以自行学习"]},{"cell_type":"code","execution_count":127,"metadata":{"collapsed":false,"id":"9CA5A467826546AD89E623FD8F730853","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Auto-assigning NUTS sampler...\n","Initializing NUTS using jitter+adapt_diag...\n","Multiprocess sampling (4 chains in 4 jobs)\n","NUTS: [beta_0, beta_1]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 11 seconds.\n"]}],"source":["coords = {\"obs_id\": df_first5.obs_id}\n","with pm.Model(coords=coords) as complete_log:\n","    #传入自变量与因变量\n","    x = pm.MutableData(\"x\", df_first5.avoidance_r, dims=\"obs_id\")\n","    y = pm.MutableData('y', df_first5.romantic, dims = 'obs_id')\n","\n","    #先验\n","    beta_0 = pm.Normal(\"beta_0\", mu=0, sigma=0.5)          #定义beta_0          \n","    beta_1 = pm.Normal(\"beta_1\", mu=0, sigma=0.5)          #定义beta_1\n","    #线性关系\n","    mu = pm.Deterministic(\"mu\", beta_0 + beta_1 * x, dims=\"obs_id\")\n","    #注意此处使用了Logistic sigmoid function：pm.math.invlogit\n","    #相当于进行了如下计算 (1 / (1 + exp(-mu))\n","    pi = pm.Deterministic(\"pi\", pm.math.invlogit(mu), dims=\"obs_id\")\n","    #似然\n","    likelihood = pm.Bernoulli(\"y_est\",p=pi, observed=y,dims=\"obs_id\")\n","\n","    complete_log_trace = pm.sample(draws=5000,            # 使用mcmc方法进行采样，draws为采样次数\n","                            tune=1000,                    # tune为调整采样策略的次数，可以决定这些结果是否要被保留\n","                            chains=4,                     # 链数\n","                            discard_tuned_samples= True,  # tune的结果将在采样结束后被丢弃\n","                            random_seed=84735,\n","                            target_accept=0.99)"]},{"cell_type":"code","execution_count":128,"metadata":{"collapsed":false,"id":"B7A741E84BE24B1CA0AC6545D40EE134","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[],"source":["#获得新数据集的索引\n","logit_index = get_group_index(data=df_first5)"]},{"cell_type":"code","execution_count":129,"metadata":{"collapsed":false,"id":"881E86BAFE6549ABA8049413D6B9EB5D","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[],"source":["#绘图逻辑与上一个函数一样，只是此处使用logistic回归，绘制的变量需要更改\n","def plot_logit_regression(data,trace,group_index):\n","    # 定义画布，根据站点数量定义画布的列数\n","    fig, ax = plt.subplots(1,len(data[\"Site\"].unique()), \n","                        sharex=True,\n","                        sharey=True,\n","                        figsize=(15,5))\n","    \n","    # 根据站点数来分别绘图\n","    # 我们需要的数据有原始数据，每一个因变量的后验预测均值\n","    # 这些数据都储存在后验参数采样结果中，也就是这里所用的trace\n","    for i, group in enumerate(data[\"Site\"].unique()):\n","        x = trace.constant_data.x.sel(obs_id = group_index[f\"{group}\"])\n","        #得到每个站点内的恋爱概率均值，并设置标题\n","        pi_mean = trace.posterior.pi.sel(obs_id = group_index[f\"{group}\"]).mean().values\n","        ax[i].set_title(f\"Bern({pi_mean:.2f})\")\n","\n","        #绘制真实数据散点图\n","        ax[i].scatter(x,\n","                trace.observed_data.y_est.sel(obs_id = group_index[f\"{group}\"]),\n","                color=f\"C{i}\",\n","                alpha=0.2)\n","    # 生成横坐标名称    \n","    fig.text(0.5, 0, 'Avoidance', ha='center', va='center', fontsize=12)\n","    # 生成纵坐标名称\n","    fig.text(0.08, 0.5, 'Romantic', ha='center', va='center', rotation='vertical', fontsize=12)\n","    # 改变刻度\n","    plt.yticks([0,1])\n","    # 生成标题\n","    plt.suptitle(\"Posterior regression models\", fontsize=15,y=1.05)\n","    \n","    sns.despine()"]},{"cell_type":"code","execution_count":130,"metadata":{"collapsed":false,"id":"5744DF0818B346D09A6ADA240484FE38","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/9DE17D61877D49088B81990558CDF903/s5wll4zfw9.png\">"],"text/plain":["<Figure size 1500x500 with 5 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["plot_logit_regression(data=df_first5,\n","                      trace=complete_log_trace,\n","                      group_index=logit_index)"]},{"cell_type":"markdown","metadata":{"id":"F7AE5A573BB8433FA04C48057D4FF00B","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[]},"source":["### 层级模型  \n","\n","$$  \n","\n","\\begin{array}{rll}  \n","Y_{ij}|\\beta_{0j},\\beta_{1j} & \\sim \\text{Bern}(\\pi_{ij})\\; \\text{ with } \\;\\; \\pi_i = \\frac{e^{\\beta_{0j} + \\beta_{1j} X_{ij}}}{1 + e^{\\beta_{0j} + \\beta_{1j} X_{ij}}} \\\\  \n","&& \\text{(每个站点 $j$内的线性模型)}\\\\  \n","\\beta_{0j} | \\beta_0, \\sigma_0    & \\stackrel{ind}{\\sim} N(\\beta_0, \\sigma_0^2) & \\text{(截距在站点间的变化)} \\\\  \n","\\beta_{1j} | \\beta_1, \\sigma_1    & \\stackrel{ind}{\\sim} N(\\beta_1, \\sigma_1^2) & \\text{(斜率在站点间的变化)} \\\\  \n","\\beta_{0}  &  \\sim N\\left(0, 0.5^2 \\right) & \\text{(全局参数的先验)}\\\\  \n","\\beta_1  &  \\sim N\\left(0, 0.5^2 \\right) & \\\\  \n","\\sigma_0 & \\sim \\text{Exp}(1). & \\\\  \n","\\sigma_1 & \\sim \\text{Exp}(1). & \\\\  \n","\\end{array}  \n","\n","$$"]},{"cell_type":"code","execution_count":131,"metadata":{"collapsed":false,"id":"FA0ED3FFEBB947CDB794853652AFF4B5","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"name":"stderr","output_type":"stream","text":["Auto-assigning NUTS sampler...\n","Initializing NUTS using jitter+adapt_diag...\n","Multiprocess sampling (4 chains in 4 jobs)\n","NUTS: [beta_0, beta_0_sigma, beta_1, beta_1_sigma, beta_0_offset, beta_1_offset]\n"]},{"data":{"text/html":["\n","<style>\n","    /* Turns off some styling */\n","    progress {\n","        /* gets rid of default border in Firefox and Opera. */\n","        border: none;\n","        /* Needs to be in here for Safari polyfill so background images work as expected. */\n","        background-size: auto;\n","    }\n","    progress:not([value]), progress:not([value])::-webkit-progress-bar {\n","        background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n","    }\n","    .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n","        background: #F44336;\n","    }\n","</style>\n"],"text/plain":["<IPython.core.display.HTML object>"]},"metadata":{},"output_type":"display_data"},{"name":"stderr","output_type":"stream","text":["Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 75 seconds.\n"]}],"source":["non_centered = True\n","coords = {\"site\": df_first5[\"Site\"].unique(),\n","          \"obs_id\": df_first5.obs_id}\n","with pm.Model(coords=coords) as hier_log:\n","    #传入自变量与因变量\n","    x = pm.MutableData(\"x\", df_first5.avoidance_r, dims=\"obs_id\")\n","    y = pm.MutableData('y', df_first5.romantic, dims = 'obs_id')\n","\n","    #定义全局参数\n","    beta_0 = pm.Normal(\"beta_0\", mu=0, sigma=0.5)          #定义beta_0\n","    beta_0_sigma = pm.Exponential(\"beta_0_sigma\", 1)          \n","    beta_1 = pm.Normal(\"beta_1\", mu=0, sigma=0.5)          #定义beta_1\n","    beta_1_sigma = pm.Exponential(\"beta_1_sigma\", 1)\n","\n","    #获得观测值对应的站点映射\n","    site = pm.MutableData(\"site\", df_first5.site_idx, dims=\"obs_id\") \n","\n","    #选择不同的模型定义方式，定义截距、斜率\n","    if non_centered:\n","        beta_0_offset = pm.Normal(\"beta_0_offset\", 0, sigma=1, dims=\"site\")\n","        beta_0j = pm.Deterministic(\"beta_0j\", beta_0 + beta_0_offset * beta_0_sigma, dims=\"site\")\n","        beta_1_offset = pm.Normal(\"beta_1_offset\", 0, sigma=1, dims=\"site\")\n","        beta_1j = pm.Deterministic(\"beta_1j\", beta_1 + beta_1_offset * beta_1_sigma, dims=\"site\")\n","    else:\n","        beta_0j = pm.Normal(\"beta_0j\", mu=beta_0, sigma=beta_0_sigma, dims=\"site\")\n","        beta_1j = pm.Normal(\"beta_1j\", mu=beta_1, sigma=beta_1_sigma, dims=\"site\")\n","\n","    #线性关系\n","    mu = pm.Deterministic(\"mu\", beta_0j[site] + beta_1j[site] * x, dims=\"obs_id\")\n","    #进行logit变换\n","    pi = pm.Deterministic(\"pi\", pm.math.invlogit(mu), dims=\"obs_id\")\n","    #似然\n","    likelihood = pm.Bernoulli(\"y_est\",p=pi, observed=y,dims=\"obs_id\")\n","\n","    hier_log_trace = pm.sample(draws=5000,            # 使用mcmc方法进行采样，draws为采样次数\n","                        tune=1000,                    # tune为调整采样策略的次数，可以决定这些结果是否要被保留\n","                        chains=4,                     # 链数\n","                        discard_tuned_samples= True,  # tune的结果将在采样结束后被丢弃\n","                        random_seed=84735,\n","                        target_accept=0.99)"]},{"cell_type":"code","execution_count":132,"metadata":{"collapsed":false,"id":"CF6C4FA1BEB44D2D8DAD710BB9D1C438","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>mean</th>\n","      <th>sd</th>\n","      <th>hdi_3%</th>\n","      <th>hdi_97%</th>\n","      <th>mcse_mean</th>\n","      <th>mcse_sd</th>\n","      <th>ess_bulk</th>\n","      <th>ess_tail</th>\n","      <th>r_hat</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>beta_0</th>\n","      <td>0.140</td>\n","      <td>0.280</td>\n","      <td>-0.371</td>\n","      <td>0.694</td>\n","      <td>0.003</td>\n","      <td>0.002</td>\n","      <td>8326.0</td>\n","      <td>11056.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_1</th>\n","      <td>0.000</td>\n","      <td>0.155</td>\n","      <td>-0.285</td>\n","      <td>0.302</td>\n","      <td>0.002</td>\n","      <td>0.001</td>\n","      <td>10779.0</td>\n","      <td>9688.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0_offset[Kassel]</th>\n","      <td>0.742</td>\n","      <td>0.591</td>\n","      <td>-0.297</td>\n","      <td>1.910</td>\n","      <td>0.006</td>\n","      <td>0.004</td>\n","      <td>9882.0</td>\n","      <td>12353.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0_offset[Portugal]</th>\n","      <td>0.441</td>\n","      <td>0.691</td>\n","      <td>-0.821</td>\n","      <td>1.772</td>\n","      <td>0.006</td>\n","      <td>0.005</td>\n","      <td>12713.0</td>\n","      <td>12973.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>beta_0_offset[Southampton]</th>\n","      <td>0.684</td>\n","      <td>0.830</td>\n","      <td>-0.916</td>\n","      <td>2.232</td>\n","      <td>0.007</td>\n","      <td>0.005</td>\n","      <td>15204.0</td>\n","      <td>13496.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>...</th>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","    </tr>\n","    <tr>\n","      <th>pi[410]</th>\n","      <td>0.461</td>\n","      <td>0.061</td>\n","      <td>0.345</td>\n","      <td>0.573</td>\n","      <td>0.000</td>\n","      <td>0.000</td>\n","      <td>24078.0</td>\n","      <td>18584.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>pi[411]</th>\n","      <td>0.495</td>\n","      <td>0.075</td>\n","      <td>0.352</td>\n","      <td>0.633</td>\n","      <td>0.000</td>\n","      <td>0.000</td>\n","      <td>22700.0</td>\n","      <td>17807.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>pi[412]</th>\n","      <td>0.495</td>\n","      <td>0.075</td>\n","      <td>0.352</td>\n","      <td>0.633</td>\n","      <td>0.000</td>\n","      <td>0.000</td>\n","      <td>22700.0</td>\n","      <td>17807.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>pi[413]</th>\n","      <td>0.491</td>\n","      <td>0.067</td>\n","      <td>0.364</td>\n","      <td>0.614</td>\n","      <td>0.000</td>\n","      <td>0.000</td>\n","      <td>23240.0</td>\n","      <td>18136.0</td>\n","      <td>1.0</td>\n","    </tr>\n","    <tr>\n","      <th>pi[414]</th>\n","      <td>0.471</td>\n","      <td>0.047</td>\n","      <td>0.382</td>\n","      <td>0.558</td>\n","      <td>0.000</td>\n","      <td>0.000</td>\n","      <td>26131.0</td>\n","      <td>17426.0</td>\n","      <td>1.0</td>\n","    </tr>\n","  </tbody>\n","</table>\n","<p>838 rows × 9 columns</p>\n","</div>"],"text/plain":["                             mean     sd  hdi_3%  hdi_97%  mcse_mean  mcse_sd  \\\n","beta_0                      0.140  0.280  -0.371    0.694      0.003    0.002   \n","beta_1                      0.000  0.155  -0.285    0.302      0.002    0.001   \n","beta_0_offset[Kassel]       0.742  0.591  -0.297    1.910      0.006    0.004   \n","beta_0_offset[Portugal]     0.441  0.691  -0.821    1.772      0.006    0.005   \n","beta_0_offset[Southampton]  0.684  0.830  -0.916    2.232      0.007    0.005   \n","...                           ...    ...     ...      ...        ...      ...   \n","pi[410]                     0.461  0.061   0.345    0.573      0.000    0.000   \n","pi[411]                     0.495  0.075   0.352    0.633      0.000    0.000   \n","pi[412]                     0.495  0.075   0.352    0.633      0.000    0.000   \n","pi[413]                     0.491  0.067   0.364    0.614      0.000    0.000   \n","pi[414]                     0.471  0.047   0.382    0.558      0.000    0.000   \n","\n","                            ess_bulk  ess_tail  r_hat  \n","beta_0                        8326.0   11056.0    1.0  \n","beta_1                       10779.0    9688.0    1.0  \n","beta_0_offset[Kassel]         9882.0   12353.0    1.0  \n","beta_0_offset[Portugal]      12713.0   12973.0    1.0  \n","beta_0_offset[Southampton]   15204.0   13496.0    1.0  \n","...                              ...       ...    ...  \n","pi[410]                      24078.0   18584.0    1.0  \n","pi[411]                      22700.0   17807.0    1.0  \n","pi[412]                      22700.0   17807.0    1.0  \n","pi[413]                      23240.0   18136.0    1.0  \n","pi[414]                      26131.0   17426.0    1.0  \n","\n","[838 rows x 9 columns]"]},"execution_count":132,"metadata":{},"output_type":"execute_result"}],"source":["az.summary(hier_log_trace)"]},{"cell_type":"code","execution_count":133,"metadata":{"collapsed":false,"id":"FA86595D24B54748ABC384CFAE333F0A","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"outputs":[{"data":{"text/html":["<img src=\"https://cdn.kesci.com/upload/rt/4764D1976188462B94A7F1C6895D852B/s5wlo03dgx.png\">"],"text/plain":["<Figure size 1500x500 with 5 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["plot_logit_regression(data=df_first5,\n","                      trace=hier_log_trace,\n","                      group_index=logit_index)"]},{"cell_type":"markdown","metadata":{"id":"FC04ED8E6AD241D59D6C1B27AFB4C630","jupyter":{},"notebookId":"658159bf827c81a449ae8e8f","runtime":{"execution_status":null,"is_visible":false,"status":"default"},"scrolled":false,"slideshow":{"slide_type":"slide"},"tags":[],"trusted":true},"source":["## 总结  \n","\n","本节课介绍了如何使用将分层模型扩展到一般线性模型，以及广义线性模型。  \n","\n","重点内容包括：  \n","* 如何根据研究问题和假设来确定模型  \n","* 如何在PyMC中定义分层模型，包括变化的截距、变化的斜率  \n","* 如何通过模型比较来检验不同的假设  \n","* 如何使用分层模型预测其他群体(站点)的结果  \n","* 如何使用Bambi定义广义分层线性模型  \n","\n","🎉🎉🎉🎉🎉 最后，本课程的正式内容也到此为止，感谢大家参与本门课程，希望大家能在实践中应用课程中的知识和技能，提高自己统计分析的能力。"]}],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.11.5"}},"nbformat":4,"nbformat_minor":2}
